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

Unified Diff: chrome/browser/sync/profile_sync_service_preference_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_preference_unittest.cc
diff --git a/chrome/browser/sync/profile_sync_service_preference_unittest.cc b/chrome/browser/sync/profile_sync_service_preference_unittest.cc
index 486eaa81076381a1b1728e391decdb05d2716898..66bc938086f108d92f68a1a01b1a7a6506da1a00 100644
--- a/chrome/browser/sync/profile_sync_service_preference_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_preference_unittest.cc
@@ -154,6 +154,8 @@ class ProfileSyncServicePreferenceTest
SigninManagerBase* signin =
SigninManagerFactory::GetForProfile(profile_.get());
signin->SetAuthenticatedUsername("test");
+ ProfileOAuth2TokenServiceFactory::GetInstance()->SetTestingFactory(
+ profile_.get(), FakeOAuth2TokenService::BuildTokenService);
sync_service_ = static_cast<TestProfileSyncService*>(
ProfileSyncServiceFactory::GetInstance()->SetTestingFactoryAndUse(
profile_.get(), &TestProfileSyncService::BuildAutoStartAsyncInit));
@@ -181,6 +183,8 @@ class ProfileSyncServicePreferenceTest
&change_processor_));
sync_service_->RegisterDataTypeController(dtc_);
TokenServiceFactory::GetForProfile(profile_.get())->IssueAuthTokenForTest(
+ GaiaConstants::kGaiaOAuth2LoginRefreshToken, "oauth2_login_token");
+ TokenServiceFactory::GetForProfile(profile_.get())->IssueAuthTokenForTest(
GaiaConstants::kSyncService, "token");
sync_service_->Initialize();

Powered by Google App Engine
This is Rietveld 408576698