Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1448)

Unified Diff: components/doodle/doodle_fetcher_impl_unittest.cc

Issue 2776973003: [Doodle] Move ttl clamping from fetcher to service (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/doodle/doodle_fetcher_impl.cc ('k') | components/doodle/doodle_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/doodle/doodle_fetcher_impl_unittest.cc
diff --git a/components/doodle/doodle_fetcher_impl_unittest.cc b/components/doodle/doodle_fetcher_impl_unittest.cc
index b9908d42237f5c4ada5598ca7010dcc95697f04a..0b51366538839c6e0d052ecc654174f3415dc08d 100644
--- a/components/doodle/doodle_fetcher_impl_unittest.cc
+++ b/components/doodle/doodle_fetcher_impl_unittest.cc
@@ -228,28 +228,6 @@ TEST_F(DoodleFetcherImplTest, ResponseContainsValidBaseInformation) {
EXPECT_THAT(time_to_live, Eq(base::TimeDelta::FromMilliseconds(55000)));
}
-TEST_F(DoodleFetcherImplTest, DoodleExpiresWithinThirtyDaysForTooLargeTTL) {
- base::MockCallback<DoodleFetcherImpl::FinishedCallback> callback;
- doodle_fetcher()->FetchDoodle(callback.Get());
-
- DoodleState state = DoodleState::NO_DOODLE;
- base::TimeDelta time_to_live;
- base::Optional<DoodleConfig> response;
- EXPECT_CALL(callback, Run(_, _, _))
- .WillOnce(DoAll(SaveArg<0>(&state), SaveArg<1>(&time_to_live),
- SaveArg<2>(&response)));
- RespondWithData(R"json({"ddljson": {
- "time_to_live_ms":5184000000,
- "large_image": {"url":"/logos/doodles/2015/some.gif"}
- }})json"); // 60 days
-
- EXPECT_THAT(state, Eq(DoodleState::AVAILABLE));
- EXPECT_TRUE(response.has_value());
- EXPECT_THAT(time_to_live,
- Eq(base::TimeDelta::FromMilliseconds(30ul * 24 * 60 * 60 *
- 1000))); // 30 days
-}
-
TEST_F(DoodleFetcherImplTest, DoodleExpiresImmediatelyWithNegativeTTL) {
base::MockCallback<DoodleFetcherImpl::FinishedCallback> callback;
doodle_fetcher()->FetchDoodle(callback.Get());
« no previous file with comments | « components/doodle/doodle_fetcher_impl.cc ('k') | components/doodle/doodle_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698