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

Unified Diff: chrome/browser/sync/profile_sync_service_autofill_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_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 4f03967c9b2e5d16571d0fd5346c61f337f222cb..d5365f23a9e599f6156c8dc0c551b77bd708eab2 100644
--- a/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_autofill_unittest.cc
@@ -503,6 +503,7 @@ class ProfileSyncServiceAutofillTest
virtual void SetUp() OVERRIDE {
AbstractProfileSyncServiceTest::SetUp();
+ DLOG(INFO) << "In setup";
Andrew T Wilson (Slow) 2013/09/06 09:23:10 Remove
fgorski 2013/09/12 23:46:24 Done.
TestingProfile::Builder builder;
builder.AddTestingFactory(ProfileOAuth2TokenServiceFactory::GetInstance(),
FakeOAuth2TokenService::BuildTokenService);
@@ -588,11 +589,10 @@ class ProfileSyncServiceAutofillTest
EXPECT_CALL(*personal_data_manager_, IsDataLoaded()).
WillRepeatedly(Return(true));
- // We need tokens to get the tests going
- token_service_->IssueAuthTokenForTest(
- GaiaConstants::kGaiaOAuth2LoginRefreshToken, "oauth2_login_token");
- token_service_->IssueAuthTokenForTest(
- GaiaConstants::kSyncService, "token");
+ // We need tokens to get the tests going
+ ProfileOAuth2TokenServiceFactory::GetForProfile(profile_.get())
+ ->UpdateCredentials("test_user@gmail.com", "oauth2_login_token");
+ token_service_->IssueAuthTokenForTest(GaiaConstants::kSyncService, "token");
sync_service_->RegisterDataTypeController(data_type_controller);
sync_service_->Initialize();

Powered by Google App Engine
This is Rietveld 408576698