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

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

Issue 23382008: Making OAuth2TokenService multi-login aware, updating callers, minor fixes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing a unit test, addressing comments from courage@ Created 7 years, 3 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_unittest.cc
diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc
index 730002fa68bcd638f1d06f7784ebc16a8110f1bc..1a7143d235e3a26dc68c3becae019ed5ac9c2ff6 100644
--- a/chrome/browser/sync/profile_sync_service_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_unittest.cc
@@ -141,12 +141,10 @@ class ProfileSyncServiceTestHarness {
}
void IssueTestTokens() {
- TokenService* token_service =
- TokenServiceFactory::GetForProfile(profile.get());
- token_service->IssueAuthTokenForTest(
- GaiaConstants::kGaiaOAuth2LoginRefreshToken, "oauth2_login_token");
- token_service->IssueAuthTokenForTest(
- GaiaConstants::kSyncService, "token");
+ ProfileOAuth2TokenServiceFactory::GetForProfile(profile.get())
+ ->UpdateCredentials("test", "oauth2_login_token");
+ TokenServiceFactory::GetForProfile(profile.get())
+ ->IssueAuthTokenForTest(GaiaConstants::kSyncService, "token");
}
scoped_ptr<TestProfileSyncService> service;
@@ -296,7 +294,7 @@ TEST_F(ProfileSyncServiceTest, DisableAndEnableSyncTemporarily) {
TEST_F(ProfileSyncServiceTest, EnableSyncAndSignOut) {
SigninManager* signin =
SigninManagerFactory::GetForProfile(harness_.profile.get());
- signin->SetAuthenticatedUsername("test@test.com");
+ signin->SetAuthenticatedUsername("test");
Andrew T Wilson (Slow) 2013/09/06 09:23:10 Why did we change the username here?
fgorski 2013/09/12 23:46:24 Sync service does not care, as long as it is set,
ProfileSyncComponentsFactoryMock* factory =
new ProfileSyncComponentsFactoryMock();
harness_.service.reset(new TestProfileSyncService(

Powered by Google App Engine
This is Rietveld 408576698