Index: chrome/browser/signin/account_reconcilor_unittest.cc |
diff --git a/chrome/browser/signin/account_reconcilor_unittest.cc b/chrome/browser/signin/account_reconcilor_unittest.cc |
index 5ccfb01aa9afeafa86f17ddd4009f96929dec440..8d91abd2eba6f96eecfecea96b025fe31a3c85b3 100644 |
--- a/chrome/browser/signin/account_reconcilor_unittest.cc |
+++ b/chrome/browser/signin/account_reconcilor_unittest.cc |
@@ -316,7 +316,7 @@ TEST_F(AccountReconcilorTest, GetAccountsFromCookieSuccess) { |
const std::string account_id = |
ConnectProfileToAccount("12345", "user@gmail.com"); |
cookie_manager_service()->SetListAccountsResponseOneAccountWithExpiry( |
- "user@gmail.com", true); |
+ "user@gmail.com", "12345", true); |
EXPECT_CALL(*GetMockReconcilor(), PerformMergeAction(account_id)); |
AccountReconcilor* reconcilor = |
@@ -333,7 +333,7 @@ TEST_F(AccountReconcilorTest, GetAccountsFromCookieSuccess) { |
std::vector<gaia::ListedAccount> accounts; |
ASSERT_TRUE(cookie_manager_service()->ListAccounts(&accounts)); |
ASSERT_EQ(1u, accounts.size()); |
- ASSERT_EQ(account_id, accounts[0].email); |
+ ASSERT_EQ(account_id, accounts[0].id); |
} |
TEST_F(AccountReconcilorTest, GetAccountsFromCookieFailure) { |
@@ -367,7 +367,8 @@ TEST_P(AccountReconcilorTest, StartReconcileNoop) { |
AccountReconcilorFactory::GetForProfile(profile()); |
ASSERT_TRUE(reconcilor); |
- cookie_manager_service()->SetListAccountsResponseOneAccount("user@gmail.com"); |
+ cookie_manager_service()->SetListAccountsResponseOneAccount( |
+ "user@gmail.com", "12345"); |
reconcilor->StartReconcile(); |
ASSERT_TRUE(reconcilor->is_reconcile_started_); |
@@ -487,7 +488,7 @@ TEST_P(AccountReconcilorTest, StartReconcileNoopWithDots) { |
const std::string account_id = |
ConnectProfileToAccount("12345", "Dot.S@gmail.com"); |
cookie_manager_service()->SetListAccountsResponseOneAccount( |
- "dot.s@gmail.com"); |
+ "dot.s@gmail.com", "12345"); |
AccountReconcilor* reconcilor = |
AccountReconcilorFactory::GetForProfile(profile()); |
ASSERT_TRUE(reconcilor); |
@@ -508,7 +509,7 @@ TEST_P(AccountReconcilorTest, StartReconcileNoopMultiple) { |
const std::string account_id2 = |
PickAccountIdForAccount("67890", "other@gmail.com"); |
cookie_manager_service()->SetListAccountsResponseTwoAccounts( |
- "user@gmail.com", "other@gmail.com"); |
+ "user@gmail.com", "12345", "other@gmail.com", "67890"); |
token_service()->UpdateCredentials(account_id2, "refresh_token"); |
AccountReconcilor* reconcilor = |
@@ -532,7 +533,7 @@ TEST_P(AccountReconcilorTest, StartReconcileAddToCookie) { |
ConnectProfileToAccount("12345", "user@gmail.com"); |
token_service()->UpdateCredentials(account_id, "refresh_token"); |
cookie_manager_service()->SetListAccountsResponseOneAccount( |
- "user@gmail.com"); |
+ "user@gmail.com", "12345"); |
const std::string account_id2 = |
PickAccountIdForAccount("67890", "other@gmail.com"); |
@@ -564,7 +565,7 @@ TEST_P(AccountReconcilorTest, StartReconcileRemoveFromCookie) { |
ConnectProfileToAccount("12345", "user@gmail.com"); |
token_service()->UpdateCredentials(account_id, "refresh_token"); |
cookie_manager_service()->SetListAccountsResponseTwoAccounts( |
- "user@gmail.com", "other@gmail.com"); |
+ "user@gmail.com", "12345", "other@gmail.com", "67890"); |
EXPECT_CALL(*GetMockReconcilor(), PerformLogoutAllAccountsAction()); |
EXPECT_CALL(*GetMockReconcilor(), PerformMergeAction(account_id)); |
@@ -597,7 +598,7 @@ TEST_P(AccountReconcilorTest, StartReconcileAddToCookieTwice) { |
PickAccountIdForAccount("34567", "third@gmail.com"); |
cookie_manager_service()->SetListAccountsResponseOneAccount( |
- "user@gmail.com"); |
+ "user@gmail.com", "12345"); |
token_service()->UpdateCredentials(account_id2, "refresh_token"); |
EXPECT_CALL(*GetMockReconcilor(), PerformMergeAction(account_id2)); |
@@ -623,7 +624,7 @@ TEST_P(AccountReconcilorTest, StartReconcileAddToCookieTwice) { |
// Do another pass after I've added a third account to the token service |
cookie_manager_service()->SetListAccountsResponseTwoAccounts( |
- "user@gmail.com", "other@gmail.com"); |
+ "user@gmail.com", "12345", "other@gmail.com", "67890"); |
cookie_manager_service()->set_list_accounts_fetched_once_for_testing(false); |
// This will cause the reconcilor to fire. |
@@ -661,7 +662,7 @@ TEST_P(AccountReconcilorTest, StartReconcileBadPrimary) { |
token_service()->UpdateCredentials(account_id2, "refresh_token"); |
cookie_manager_service()->SetListAccountsResponseTwoAccounts( |
- "other@gmail.com", "user@gmail.com"); |
+ "other@gmail.com", "12345", "user@gmail.com", "67890"); |
EXPECT_CALL(*GetMockReconcilor(), PerformLogoutAllAccountsAction()); |
EXPECT_CALL(*GetMockReconcilor(), PerformMergeAction(account_id)); |
@@ -693,7 +694,7 @@ TEST_P(AccountReconcilorTest, StartReconcileOnlyOnce) { |
const std::string account_id = |
ConnectProfileToAccount("12345", "user@gmail.com"); |
cookie_manager_service()->SetListAccountsResponseOneAccount( |
- "user@gmail.com"); |
+ "user@gmail.com", "12345"); |
AccountReconcilor* reconcilor = |
AccountReconcilorFactory::GetForProfile(profile()); |
@@ -736,7 +737,7 @@ TEST_F(AccountReconcilorTest, AddAccountToCookieCompletedWithBogusAccount) { |
const std::string account_id = |
ConnectProfileToAccount("12345", "user@gmail.com"); |
cookie_manager_service()->SetListAccountsResponseOneAccountWithExpiry( |
- "user@gmail.com", true); |
+ "user@gmail.com", "12345", true); |
EXPECT_CALL(*GetMockReconcilor(), PerformMergeAction(account_id)); |