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

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

Issue 13197004: Draft: InvalidationService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Passes tests Created 7 years, 8 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 b34a6eb546525fb789e88f04aed920f429925911..79c916cc947de9862d56fab23086483906271ae2 100644
--- a/chrome/browser/sync/profile_sync_service_preference_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_preference_unittest.cc
@@ -13,6 +13,7 @@
#include "base/location.h"
#include "base/stl_util.h"
#include "base/strings/string_piece.h"
+#include "chrome/browser/invalidation_service_factory.h"
#include "chrome/browser/prefs/pref_model_associator.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/browser/signin/signin_manager.h"
@@ -122,6 +123,9 @@ class ProfileSyncServicePreferenceTest
AbstractProfileSyncServiceTest::SetUp();
profile_.reset(new TestingProfile());
profile_->CreateRequestContext();
+ InvalidationServiceFactory::GetInstance()->SetTestingFactory(
+ profile_.get(),
+ InvalidationServiceFactory::BuildTestServiceInstanceFor);
prefs_ = profile_->GetTestingPrefService();
prefs_->registry()->RegisterStringPref(
@@ -149,7 +153,8 @@ class ProfileSyncServicePreferenceTest
if (sync_service_)
return false;
- SigninManager* signin = SigninManagerFactory::GetForProfile(profile_.get());
+ SigninManager* signin =
+ SigninManagerFactory::GetForProfile(profile_.get());
signin->SetAuthenticatedUsername("test");
sync_service_ = static_cast<TestProfileSyncService*>(
ProfileSyncServiceFactory::GetInstance()->SetTestingFactoryAndUse(

Powered by Google App Engine
This is Rietveld 408576698