Chromium Code Reviews| 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 ca312d50a869fcb0957042a675a0a3cac18a39f7..9da0f1de9d7a3022a2a4f02b8017b5ef641e2fae 100644 |
| --- a/chrome/browser/signin/account_reconcilor_unittest.cc |
| +++ b/chrome/browser/signin/account_reconcilor_unittest.cc |
| @@ -262,7 +262,7 @@ TEST_F(AccountReconcilorTest, ValidateAccountsFromTokens) { |
| reconcilor->ValidateAccountsFromTokenService(); |
| ASSERT_FALSE(reconcilor->AreAllRefreshTokensChecked()); |
| - SetFakeResponse("https://www.googleapis.com/oauth2/v1/userinfo", |
| + SetFakeResponse(GaiaUrls::GetInstance()->people_get_url().spec(), |
|
noms (inactive)
2014/04/25 17:07:40
Should this function be made into a helper? I see
Roger Tawa OOO till Jul 10th
2014/04/28 20:44:12
I think its clearer and more explicit like this fo
|
| "{\"id\":\"foo\"}", net::HTTP_OK, net::URLRequestStatus::SUCCESS); |
| token_service()->IssueTokenForAllPendingRequests("access_token", |
| base::Time::Now() + base::TimeDelta::FromHours(1)); |
| @@ -284,7 +284,7 @@ TEST_F(AccountReconcilorTest, ValidateAccountsFromTokensFailedUserInfo) { |
| reconcilor->ValidateAccountsFromTokenService(); |
| ASSERT_FALSE(reconcilor->AreAllRefreshTokensChecked()); |
| - SetFakeResponse("https://www.googleapis.com/oauth2/v1/userinfo", |
| + SetFakeResponse(GaiaUrls::GetInstance()->people_get_url().spec(), |
| "", net::HTTP_NOT_FOUND, net::URLRequestStatus::SUCCESS); |
| token_service()->IssueTokenForAllPendingRequests("access_token", |
| base::Time::Now() + base::TimeDelta::FromHours(1)); |
| @@ -326,7 +326,7 @@ TEST_F(AccountReconcilorTest, StartReconcileNoop) { |
| SetFakeResponse(GaiaUrls::GetInstance()->list_accounts_url().spec(), |
| "[\"f\", [[\"b\", 0, \"n\", \"user@gmail.com\", \"p\", 0, 0, 0, 0, 1]]]", |
| net::HTTP_OK, net::URLRequestStatus::SUCCESS); |
| - SetFakeResponse("https://www.googleapis.com/oauth2/v1/userinfo", |
| + SetFakeResponse(GaiaUrls::GetInstance()->people_get_url().spec(), |
| "{\"id\":\"foo\"}", net::HTTP_OK, net::URLRequestStatus::SUCCESS); |
| reconcilor->StartReconcile(); |
| @@ -365,7 +365,7 @@ TEST_F(AccountReconcilorTest, StartReconcileNoopWithDots) { |
| SetFakeResponse(GaiaUrls::GetInstance()->list_accounts_url().spec(), |
| "[\"f\", [[\"b\", 0, \"n\", \"dot.s@gmail.com\", \"p\", 0, 0, 0, 0, 1]]]", |
| net::HTTP_OK, net::URLRequestStatus::SUCCESS); |
| - SetFakeResponse("https://www.googleapis.com/oauth2/v1/userinfo", |
| + SetFakeResponse(GaiaUrls::GetInstance()->people_get_url().spec(), |
| "{\"id\":\"foo\"}", net::HTTP_OK, net::URLRequestStatus::SUCCESS); |
| reconcilor->StartReconcile(); |
| @@ -400,7 +400,7 @@ TEST_F(AccountReconcilorTest, StartReconcileNoopMultiple) { |
| "[\"f\", [[\"b\", 0, \"n\", \"user@gmail.com\", \"p\", 0, 0, 0, 0, 1], " |
| "[\"b\", 0, \"n\", \"other@gmail.com\", \"p\", 0, 0, 0, 0, 1]]]", |
| net::HTTP_OK, net::URLRequestStatus::SUCCESS); |
| - SetFakeResponse("https://www.googleapis.com/oauth2/v1/userinfo", |
| + SetFakeResponse(GaiaUrls::GetInstance()->people_get_url().spec(), |
| "{\"id\":\"foo\"}", net::HTTP_OK, net::URLRequestStatus::SUCCESS); |
| reconcilor->StartReconcile(); |
| @@ -436,7 +436,7 @@ TEST_F(AccountReconcilorTest, StartReconcileAddToCookie) { |
| SetFakeResponse(GaiaUrls::GetInstance()->list_accounts_url().spec(), |
| "[\"f\", [[\"b\", 0, \"n\", \"user@gmail.com\", \"p\", 0, 0, 0, 0, 1]]]", |
| net::HTTP_OK, net::URLRequestStatus::SUCCESS); |
| - SetFakeResponse("https://www.googleapis.com/oauth2/v1/userinfo", |
| + SetFakeResponse(GaiaUrls::GetInstance()->people_get_url().spec(), |
| "{\"id\":\"foo\"}", net::HTTP_OK, net::URLRequestStatus::SUCCESS); |
| AccountReconcilor* reconcilor = GetMockReconcilor(); |
| @@ -464,7 +464,7 @@ TEST_F(AccountReconcilorTest, StartReconcileAddToChrome) { |
| "[\"f\", [[\"b\", 0, \"n\", \"user@gmail.com\", \"p\", 0, 0, 0, 0, 1], " |
| "[\"b\", 0, \"n\", \"other@gmail.com\", \"p\", 0, 0, 0, 0, 1]]]", |
| net::HTTP_OK, net::URLRequestStatus::SUCCESS); |
| - SetFakeResponse("https://www.googleapis.com/oauth2/v1/userinfo", |
| + SetFakeResponse(GaiaUrls::GetInstance()->people_get_url().spec(), |
| "{\"id\":\"foo\"}", net::HTTP_OK, net::URLRequestStatus::SUCCESS); |
| AccountReconcilor* reconcilor = GetMockReconcilor(); |
| @@ -491,7 +491,7 @@ TEST_F(AccountReconcilorTest, StartReconcileBadPrimary) { |
| "[\"f\", [[\"b\", 0, \"n\", \"other@gmail.com\", \"p\", 0, 0, 0, 0, 1], " |
| "[\"b\", 0, \"n\", \"user@gmail.com\", \"p\", 0, 0, 0, 0, 1]]]", |
| net::HTTP_OK, net::URLRequestStatus::SUCCESS); |
| - SetFakeResponse("https://www.googleapis.com/oauth2/v1/userinfo", |
| + SetFakeResponse(GaiaUrls::GetInstance()->people_get_url().spec(), |
| "{\"id\":\"foo\"}", net::HTTP_OK, net::URLRequestStatus::SUCCESS); |
| AccountReconcilor* reconcilor = GetMockReconcilor(); |
| @@ -522,7 +522,7 @@ TEST_F(AccountReconcilorTest, StartReconcileOnlyOnce) { |
| SetFakeResponse(GaiaUrls::GetInstance()->list_accounts_url().spec(), |
| "[\"f\", [[\"b\", 0, \"n\", \"user@gmail.com\", \"p\", 0, 0, 0, 0, 1]]]", |
| net::HTTP_OK, net::URLRequestStatus::SUCCESS); |
| - SetFakeResponse("https://www.googleapis.com/oauth2/v1/userinfo", |
| + SetFakeResponse(GaiaUrls::GetInstance()->people_get_url().spec(), |
| "{\"id\":\"foo\"}", net::HTTP_OK, net::URLRequestStatus::SUCCESS); |
| ASSERT_FALSE(reconcilor->is_reconcile_started_); |
| @@ -547,7 +547,7 @@ TEST_F(AccountReconcilorTest, StartReconcileWithSessionInfoExpiredDefault) { |
| "[\"f\", [[\"b\", 0, \"n\", \"user@gmail.com\", \"p\", 0, 0, 0, 0, 0]," |
| "[\"b\", 0, \"n\", \"other@gmail.com\", \"p\", 0, 0, 0, 0, 1]]]", |
| net::HTTP_OK, net::URLRequestStatus::SUCCESS); |
| - SetFakeResponse("https://www.googleapis.com/oauth2/v1/userinfo", |
| + SetFakeResponse(GaiaUrls::GetInstance()->people_get_url().spec(), |
| "{\"id\":\"foo\"}", net::HTTP_OK, net::URLRequestStatus::SUCCESS); |
| AccountReconcilor* reconcilor = |