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

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

Issue 10824161: [Sync] Avoid unregistering object IDs on shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use new API Created 8 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_unittest.cc
diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc
index 78ac1f42c12ffe15ba6d1a0b7f57e0ce81c40780..fb4f2b664334f5a18aa3a5e8c7d1f8228ed34020 100644
--- a/chrome/browser/sync/profile_sync_service_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_unittest.cc
@@ -389,6 +389,7 @@ TEST_F(ProfileSyncServiceTest, UpdateRegisteredInvalidationIds) {
EXPECT_CALL(observer, OnNotificationsDisabled(
syncer::TRANSIENT_NOTIFICATION_ERROR));
+ service_->RegisterInvalidationHandler(&observer);
service_->UpdateRegisteredInvalidationIds(&observer, ids);
SyncBackendHostForProfileSyncTest* const backend =
@@ -400,7 +401,7 @@ TEST_F(ProfileSyncServiceTest, UpdateRegisteredInvalidationIds) {
Mock::VerifyAndClearExpectations(&observer);
- service_->UpdateRegisteredInvalidationIds(&observer, syncer::ObjectIdSet());
+ service_->UnregisterInvalidationHandler(&observer);
backend->EmitOnNotificationsEnabled();
backend->EmitOnIncomingNotification(payloads, syncer::REMOTE_NOTIFICATION);
@@ -425,6 +426,7 @@ TEST_F(ProfileSyncServiceTest, UpdateRegisteredInvalidationIdsPersistence) {
EXPECT_CALL(observer, OnNotificationsDisabled(
syncer::TRANSIENT_NOTIFICATION_ERROR));
+ service_->RegisterInvalidationHandler(&observer);
service_->UpdateRegisteredInvalidationIds(&observer, ids);
service_->StopAndSuppress();

Powered by Google App Engine
This is Rietveld 408576698