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

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

Issue 23068005: Convert UserPolicySigninService to use OAuth2TokenService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with ToT Created 7 years, 4 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_password_unittest.cc
diff --git a/chrome/browser/sync/profile_sync_service_password_unittest.cc b/chrome/browser/sync/profile_sync_service_password_unittest.cc
index 17b952365f95c0ccf071173b6ae7e38cdfa35582..9d3cdd637eb9901eb2ea8cd7a4dda065ef81a81b 100644
--- a/chrome/browser/sync/profile_sync_service_password_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_password_unittest.cc
@@ -32,7 +32,6 @@
#include "chrome/browser/sync/profile_sync_test_util.h"
#include "chrome/browser/sync/test_profile_sync_service.h"
#include "chrome/common/pref_names.h"
-#include "chrome/test/base/profile_mock.h"
#include "content/public/browser/notification_source.h"
#include "content/public/common/password_form.h"
#include "content/public/test/mock_notification_observer.h"
@@ -154,7 +153,10 @@ class ProfileSyncServicePasswordTest : public AbstractProfileSyncServiceTest {
virtual void SetUp() {
AbstractProfileSyncServiceTest::SetUp();
- profile_.reset(new ProfileMock());
+ TestingProfile::Builder builder;
+ builder.AddTestingFactory(ProfileOAuth2TokenServiceFactory::GetInstance(),
+ FakeOAuth2TokenService::BuildTokenService);
+ profile_ = builder.Build().Pass();
invalidation::InvalidationServiceFactory::GetInstance()->
SetBuildOnlyFakeInvalidatorsForTest(true);
password_store_ = static_cast<MockPasswordStore*>(
@@ -192,8 +194,6 @@ class ProfileSyncServicePasswordTest : public AbstractProfileSyncServiceTest {
token_service_ = static_cast<TokenService*>(
TokenServiceFactory::GetInstance()->SetTestingFactoryAndUse(
profile_.get(), BuildTokenService));
- ProfileOAuth2TokenServiceFactory::GetInstance()->SetTestingFactory(
- profile_.get(), FakeOAuth2TokenService::BuildTokenService);
PasswordTestProfileSyncService* sync =
static_cast<PasswordTestProfileSyncService*>(
@@ -314,7 +314,7 @@ class ProfileSyncServicePasswordTest : public AbstractProfileSyncServiceTest {
}
content::MockNotificationObserver observer_;
- scoped_ptr<ProfileMock> profile_;
+ scoped_ptr<TestingProfile> profile_;
scoped_refptr<MockPasswordStore> password_store_;
content::NotificationRegistrar registrar_;
};

Powered by Google App Engine
This is Rietveld 408576698