Move away from using base::Clock in AutofillDownloadManager tests
This is a preparation CL to move AutofillDownloadManager from URLFetcher to SimpleURLLoader et al. Specifically, it moves some autofill tests away from using base::Clock, for testing whether a autofill query request is properly cached/fetched. Still, both CACHE_HIT and CACHE_MISS functionalities are exercised. Basically, instead of setting the base::Clock instance with manually configured valid and expired dates, the following was changed: - the original test (AutofillQueryTest.CacheableResponse) was spun off into another test: AutofillQueryTest.ExpiredCacheInResponse. - The former sets a Cache-Control max-age value to some time in the future (100 seconds), so that its cached content is valid/reached. - The later sets a Cache-Control max-age value to 0, and delay execution in a few milliseconds to ensure the cache content is already expired, and never hit. BUG=837830,844929 Change-Id: Ib82ca230fb0169b9e6847d90019574eb571e4c97 Reviewed-on: https://chromium-review.googlesource.com/1122456Reviewed-by:Roger McFarlane <rogerm@chromium.org> Reviewed-by:
Matt Menke <mmenke@chromium.org> Commit-Queue: Antonio Gomes <tonikitoo@igalia.com> Cr-Commit-Position: refs/heads/master@{#572238}
Showing
Please register or sign in to comment