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

Unified Diff: chrome/browser/sync/profile_sync_service_autofill_unittest.cc

Issue 15421011: Use OAuth2 token for sync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 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/sync/profile_sync_service_autofill_unittest.cc
diff --git a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
index f32b7e2c0692b1baaa9d1d651e516a06e5616645..8fa2fea2a9f6b6cfe5fda5bd63fcea75cf06671b 100644
--- a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
@@ -525,6 +525,8 @@ class ProfileSyncServiceAutofillTest
token_service_ = static_cast<TokenService*>(
TokenServiceFactory::GetInstance()->SetTestingFactoryAndUse(
profile_.get(), BuildTokenService));
+ ProfileOAuth2TokenServiceFactory::GetInstance()->SetTestingFactory(
+ profile_.get(), FakeOAuth2TokenService::BuildTokenService);
EXPECT_CALL(*personal_data_manager_, LoadProfiles()).Times(1);
EXPECT_CALL(*personal_data_manager_, LoadCreditCards()).Times(1);
@@ -588,7 +590,10 @@ class ProfileSyncServiceAutofillTest
WillRepeatedly(Return(true));
// We need tokens to get the tests going
- token_service_->IssueAuthTokenForTest(GaiaConstants::kSyncService, "token");
+ token_service_->IssueAuthTokenForTest(
+ GaiaConstants::kGaiaOAuth2LoginRefreshToken, "oauth2_login_token");
+ token_service_->IssueAuthTokenForTest(
+ GaiaConstants::kSyncService, "token");
sync_service_->RegisterDataTypeController(data_type_controller);
sync_service_->Initialize();
@@ -935,7 +940,7 @@ bool IncludesField(const AutofillProfile& profile1,
return true;
}
-};
+} // namespace
// TODO(skrul): Test abort startup.
// TODO(skrul): Test processing of cloud changes.
« no previous file with comments | « chrome/browser/sync/profile_sync_service_android.cc ('k') | chrome/browser/sync/profile_sync_service_harness.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698