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

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

Issue 183803026: Clean up InvalidationService test infrastructure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 9 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 bd3bd7c6c9a60124fcefeacac807c69c9768099e..d7eafb52fd20a44103c730e76977029e07f39e7f 100644
--- a/chrome/browser/sync/profile_sync_service_preference_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_preference_unittest.cc
@@ -15,6 +15,7 @@
#include "base/prefs/scoped_user_pref_update.h"
#include "base/stl_util.h"
#include "base/strings/string_piece.h"
+#include "chrome/browser/invalidation/fake_invalidation_service.h"
#include "chrome/browser/invalidation/invalidation_service_factory.h"
#include "chrome/browser/prefs/pref_model_associator.h"
#include "chrome/browser/signin/fake_profile_oauth2_token_service.h"
@@ -51,9 +52,9 @@ using browser_sync::GenericChangeProcessor;
using browser_sync::SharedChangeProcessor;
using browser_sync::UIDataTypeController;
using syncer::ChangeRecord;
-using testing::_;
using testing::Invoke;
using testing::Return;
+using testing::_;
typedef std::map<const std::string, const base::Value*> PreferenceValues;
@@ -130,8 +131,8 @@ class ProfileSyncServicePreferenceTest
ProfileOAuth2TokenServiceFactory::GetInstance(),
FakeProfileOAuth2TokenServiceWrapper::BuildAutoIssuingTokenService);
profile_ = builder.Build().Pass();
- invalidation::InvalidationServiceFactory::GetInstance()->
- SetBuildOnlyFakeInvalidatorsForTest(true);
+ invalidation::InvalidationServiceFactory::GetInstance()->SetTestingFactory(
+ profile_.get(), invalidation::FakeInvalidationService::Build);
prefs_ = profile_->GetTestingPrefService();
prefs_->registry()->RegisterStringPref(

Powered by Google App Engine
This is Rietveld 408576698