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

Unified Diff: chrome/browser/sync/test/integration/sync_test.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/test/integration/sync_test.cc
diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc
index 9ca6fa379e1ff819b57ab6aa931cc37c84cbf5c4..6f06c1163cc2d790f9c9bebdc6b34282cd3f3e65 100644
--- a/chrome/browser/sync/test/integration/sync_test.cc
+++ b/chrome/browser/sync/test/integration/sync_test.cc
@@ -105,6 +105,12 @@ void SetProxyConfigCallback(
done->Signal();
}
+BrowserContextKeyedService* BuildP2PInvalidationService(
+ content::BrowserContext* context) {
+ Profile* profile = static_cast<Profile*>(context);
+ return new invalidation::P2PInvalidationService(profile);
+}
+
SyncTest::SyncTest(TestType test_type)
: test_type_(test_type),
server_type_(SERVER_TYPE_UNDECIDED),
@@ -314,8 +320,9 @@ void SyncTest::InitializeInstance(int index) {
<< index << ".";
invalidation::P2PInvalidationService* p2p_invalidation_service =
- InvalidationServiceFactory::GetInstance()->
- BuildAndUseP2PInvalidationServiceForTest(GetProfile(index));
+ static_cast<invalidation::P2PInvalidationService*>(
+ InvalidationServiceFactory::GetInstance()->SetTestingFactoryAndUse(
+ GetProfile(index), BuildP2PInvalidationService));
p2p_invalidation_service->UpdateCredentials(username_, password_);
// Make sure the ProfileSyncService has been created before creating the

Powered by Google App Engine
This is Rietveld 408576698