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

Unified Diff: components/ntp_snippets/remote/remote_suggestions_scheduler_impl_unittest.cc

Issue 2809263006: [Remote scheduler] Adapt the M59 defaults to M57 Stable results (Closed)
Patch Set: Fix unit-tests Created 3 years, 8 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/ntp_snippets/remote/remote_suggestions_scheduler_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/remote/remote_suggestions_scheduler_impl_unittest.cc
diff --git a/components/ntp_snippets/remote/remote_suggestions_scheduler_impl_unittest.cc b/components/ntp_snippets/remote/remote_suggestions_scheduler_impl_unittest.cc
index 220863e12e5bb748b54aeff9084f8fc4eda8bd54..9e8b4478d0a531bdb00ca72a48695ade0604c925 100644
--- a/components/ntp_snippets/remote/remote_suggestions_scheduler_impl_unittest.cc
+++ b/components/ntp_snippets/remote/remote_suggestions_scheduler_impl_unittest.cc
@@ -632,7 +632,7 @@ TEST_F(RemoteSuggestionsSchedulerImplTest, FetchIntervalForSoftTriggerOnWifi) {
// Pretend we are on WiFi (already done in ctor, we make it explicit here).
EXPECT_CALL(*persistent_scheduler(), IsOnUnmeteredConnection())
.WillRepeatedly(Return(true));
- // UserClassifier defaults to UserClass::ACTIVE_NTP_USER which uses a 2h time
+ // UserClassifier defaults to UserClass::ACTIVE_NTP_USER which uses a 3h time
// interval by default for soft background fetches on WiFi.
// Initial scheduling after being enabled.
@@ -649,11 +649,11 @@ TEST_F(RemoteSuggestionsSchedulerImplTest, FetchIntervalForSoftTriggerOnWifi) {
signal_fetch_done.Run(Status::Success());
// Open NTP again after too short delay. This time no fetch is executed.
- test_clock()->Advance(base::TimeDelta::FromMinutes(20));
+ test_clock()->Advance(base::TimeDelta::FromMinutes(30));
scheduler()->OnNTPOpened();
// Open NTP after another delay, now together long enough to issue a fetch.
- test_clock()->Advance(base::TimeDelta::FromMinutes(100));
+ test_clock()->Advance(base::TimeDelta::FromMinutes(150));
EXPECT_CALL(*provider(), RefetchInTheBackground(_));
scheduler()->OnNTPOpened();
}
@@ -696,7 +696,7 @@ TEST_F(RemoteSuggestionsSchedulerImplTest,
// Pretend we are not on wifi -> fallback connection.
EXPECT_CALL(*persistent_scheduler(), IsOnUnmeteredConnection())
.WillRepeatedly(Return(false));
- // UserClassifier defaults to UserClass::ACTIVE_NTP_USER which uses a 4h time
+ // UserClassifier defaults to UserClass::ACTIVE_NTP_USER which uses a 6h time
// interval by default for soft background fetches not on WiFi.
// Initial scheduling after being enabled.
@@ -713,7 +713,7 @@ TEST_F(RemoteSuggestionsSchedulerImplTest,
signal_fetch_done.Run(Status::Success());
// Open NTP again after too short delay. This time no fetch is executed.
- test_clock()->Advance(base::TimeDelta::FromMinutes(180));
+ test_clock()->Advance(base::TimeDelta::FromMinutes(300));
scheduler()->OnNTPOpened();
// Open NTP after another delay, now together long enough to issue a fetch.
« no previous file with comments | « components/ntp_snippets/remote/remote_suggestions_scheduler_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698