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

Unified Diff: chrome/browser/signin/cross_device_promo_unittest.cc

Issue 1166373006: Prefer to use the AccountID to the Email from ListAccounts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 5 years, 6 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: chrome/browser/signin/cross_device_promo_unittest.cc
diff --git a/chrome/browser/signin/cross_device_promo_unittest.cc b/chrome/browser/signin/cross_device_promo_unittest.cc
index 9f224022db81d9bf4ddd0db5753187b0d39c222e..1450884e7af5e86b93c4ef90a57bc610dfd20197 100644
--- a/chrome/browser/signin/cross_device_promo_unittest.cc
+++ b/chrome/browser/signin/cross_device_promo_unittest.cc
@@ -291,7 +291,7 @@ TEST_F(CrossDevicePromoTest, TrackAccountsInCookie) {
// Setting a single cookie sets the time.
base::Time before_setting_cookies = base::Time::Now();
cookie_manager_service()->set_list_accounts_fetched_once_for_testing(false);
- cookie_manager_service()->SetListAccountsResponseOneAccount("foo@bar.com");
+ cookie_manager_service()->SetListAccountsResponseOneAccount("f@bar.com", "1");
EXPECT_FALSE(cookie_manager_service()->ListAccounts(&accounts));
base::RunLoop().RunUntilIdle();
@@ -307,7 +307,7 @@ TEST_F(CrossDevicePromoTest, TrackAccountsInCookie) {
// A single cookie a second time doesn't change the time.
cookie_manager_service()->set_list_accounts_fetched_once_for_testing(false);
- cookie_manager_service()->SetListAccountsResponseOneAccount("foo@bar.com");
+ cookie_manager_service()->SetListAccountsResponseOneAccount("f@bar.com", "1");
EXPECT_FALSE(cookie_manager_service()->ListAccounts(&accounts));
base::RunLoop().RunUntilIdle();
@@ -358,7 +358,7 @@ TEST_F(CrossDevicePromoTest, SingleAccountEligibility) {
base::HistogramTester test_single_account;
std::vector<gaia::ListedAccount> accounts;
cookie_manager_service()->set_list_accounts_fetched_once_for_testing(false);
- cookie_manager_service()->SetListAccountsResponseOneAccount("foo@bar.com");
+ cookie_manager_service()->SetListAccountsResponseOneAccount("a@b.com", "1");
EXPECT_FALSE(cookie_manager_service()->ListAccounts(&accounts));
base::RunLoop().RunUntilIdle();
@@ -385,7 +385,7 @@ TEST_F(CrossDevicePromoTest, NumDevicesEligibility) {
InitPromoVariation();
EXPECT_FALSE(promo()->CheckPromoEligibilityForTesting());
cookie_manager_service()->set_list_accounts_fetched_once_for_testing(false);
- cookie_manager_service()->SetListAccountsResponseOneAccount("foo@bar.com");
+ cookie_manager_service()->SetListAccountsResponseOneAccount("f@bar.com", "1");
std::vector<gaia::ListedAccount> accounts;
EXPECT_FALSE(cookie_manager_service()->ListAccounts(&accounts));
base::RunLoop().RunUntilIdle();
@@ -455,7 +455,7 @@ TEST_F(CrossDevicePromoTest, ThrottleDeviceActivityCall) {
EXPECT_FALSE(promo()->CheckPromoEligibilityForTesting());
cookie_manager_service()->set_list_accounts_fetched_once_for_testing(false);
- cookie_manager_service()->SetListAccountsResponseOneAccount("foo@bar.com");
+ cookie_manager_service()->SetListAccountsResponseOneAccount("f@bar.com", "1");
std::vector<gaia::ListedAccount> accounts;
EXPECT_FALSE(cookie_manager_service()->ListAccounts(&accounts));
base::RunLoop().RunUntilIdle();
@@ -477,7 +477,7 @@ TEST_F(CrossDevicePromoTest, NumDevicesKnown) {
InitPromoVariation();
EXPECT_FALSE(promo()->CheckPromoEligibilityForTesting());
cookie_manager_service()->set_list_accounts_fetched_once_for_testing(false);
- cookie_manager_service()->SetListAccountsResponseOneAccount("foo@bar.com");
+ cookie_manager_service()->SetListAccountsResponseOneAccount("f@bar.com", "1");
std::vector<gaia::ListedAccount> accounts;
EXPECT_FALSE(cookie_manager_service()->ListAccounts(&accounts));
base::RunLoop().RunUntilIdle();
@@ -505,7 +505,7 @@ TEST_F(CrossDevicePromoTest, FetchDeviceResults) {
InitPromoVariation();
EXPECT_FALSE(promo()->CheckPromoEligibilityForTesting());
cookie_manager_service()->set_list_accounts_fetched_once_for_testing(false);
- cookie_manager_service()->SetListAccountsResponseOneAccount("foo@bar.com");
+ cookie_manager_service()->SetListAccountsResponseOneAccount("f@bar.com", "1");
std::vector<gaia::ListedAccount> accounts;
EXPECT_FALSE(cookie_manager_service()->ListAccounts(&accounts));
base::RunLoop().RunUntilIdle();

Powered by Google App Engine
This is Rietveld 408576698