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

Unified Diff: chrome/browser/services/gcm/gcm_account_tracker_unittest.cc

Issue 878713002: Fix to the GCM Account Tracker flooding on a stale refresh token (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « chrome/browser/services/gcm/gcm_account_tracker.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/services/gcm/gcm_account_tracker_unittest.cc
diff --git a/chrome/browser/services/gcm/gcm_account_tracker_unittest.cc b/chrome/browser/services/gcm/gcm_account_tracker_unittest.cc
index eb8030a165ff1e8cad90d967fedd69fab90fdb61..2093f6b313baff58dba47c07e344c64e922f3c2d 100644
--- a/chrome/browser/services/gcm/gcm_account_tracker_unittest.cc
+++ b/chrome/browser/services/gcm/gcm_account_tracker_unittest.cc
@@ -359,16 +359,13 @@ TEST_F(GCMAccountTrackerTest, GetTokenFailed) {
EXPECT_FALSE(driver()->update_accounts_called());
IssueError(kAccountId2);
- EXPECT_FALSE(driver()->update_accounts_called());
-
- EXPECT_EQ(1UL, tracker()->get_pending_token_request_count());
- IssueAccessToken(kAccountId2);
+ // Failed token is not retried any more. Account marked as removed.
+ EXPECT_EQ(0UL, tracker()->get_pending_token_request_count());
EXPECT_TRUE(driver()->update_accounts_called());
std::vector<GCMClient::AccountTokenInfo> expected_accounts;
expected_accounts.push_back(MakeAccountToken(kAccountId1));
- expected_accounts.push_back(MakeAccountToken(kAccountId2));
VerifyAccountTokens(expected_accounts, driver()->accounts());
}
@@ -378,7 +375,6 @@ TEST_F(GCMAccountTrackerTest, GetTokenFailedAccountRemoved) {
tracker()->Start();
IssueAccessToken(kAccountId1);
- IssueError(kAccountId2);
driver()->ResetResults();
SignOutAccount(kAccountId2);
« no previous file with comments | « chrome/browser/services/gcm/gcm_account_tracker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698