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

Unified Diff: sync/engine/backoff_delay_provider_unittest.cc

Issue 232003005: [Sync] Add support for retrying a getupdates due to a context change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 6 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
Index: sync/engine/backoff_delay_provider_unittest.cc
diff --git a/sync/engine/backoff_delay_provider_unittest.cc b/sync/engine/backoff_delay_provider_unittest.cc
index 1bf17cbd5f5fc10c759c24148c9cd36ad4025870..2e5818665f2f94b092e2e0f1ae00323078e7dfe9 100644
--- a/sync/engine/backoff_delay_provider_unittest.cc
+++ b/sync/engine/backoff_delay_provider_unittest.cc
@@ -57,6 +57,10 @@ TEST_F(BackoffDelayProviderTest, GetInitialDelay) {
EXPECT_EQ(kInitialBackoffRetrySeconds,
delay->GetInitialDelay(state).InSeconds());
+ state.last_download_updates_result = DATATYPE_TRIGGERED_RETRY;
+ EXPECT_EQ(kInitialBackoffImmediateRetrySeconds,
+ delay->GetInitialDelay(state).InSeconds());
+
state.last_download_updates_result = SYNCER_OK;
// Note that updating credentials triggers a canary job, trumping
// the initial delay, but in theory we still expect this function to treat
@@ -99,6 +103,10 @@ TEST_F(BackoffDelayProviderTest, GetInitialDelayWithOverride) {
EXPECT_EQ(kInitialBackoffShortRetrySeconds,
delay->GetInitialDelay(state).InSeconds());
+ state.last_download_updates_result = DATATYPE_TRIGGERED_RETRY;
+ EXPECT_EQ(kInitialBackoffImmediateRetrySeconds,
+ delay->GetInitialDelay(state).InSeconds());
+
state.last_download_updates_result = SYNCER_OK;
// Note that updating credentials triggers a canary job, trumping
// the initial delay, but in theory we still expect this function to treat

Powered by Google App Engine
This is Rietveld 408576698