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

Unified Diff: sync/notifier/sync_notifier_factory_unittest.cc

Issue 10824161: [Sync] Avoid unregistering object IDs on shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Work around brittle unit test 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
« no previous file with comments | « sync/notifier/sync_notifier.h ('k') | sync/notifier/sync_notifier_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/sync_notifier_factory_unittest.cc
diff --git a/sync/notifier/sync_notifier_factory_unittest.cc b/sync/notifier/sync_notifier_factory_unittest.cc
index 8036c1a172170d66b9298344c7427e0752753074..50d923bb7ee11159e897529b96b700c0934d93fb 100644
--- a/sync/notifier/sync_notifier_factory_unittest.cc
+++ b/sync/notifier/sync_notifier_factory_unittest.cc
@@ -61,8 +61,9 @@ TEST_F(SyncNotifierFactoryTest, Basic) {
#else
ASSERT_TRUE(notifier.get());
ObjectIdSet ids = ModelTypeSetToObjectIdSet(ModelTypeSet(syncer::BOOKMARKS));
+ notifier->RegisterHandler(&mock_observer_);
notifier->UpdateRegisteredIds(&mock_observer_, ids);
- notifier->UpdateRegisteredIds(&mock_observer_, ObjectIdSet());
+ notifier->UnregisterHandler(&mock_observer_);
#endif
}
@@ -79,8 +80,9 @@ TEST_F(SyncNotifierFactoryTest, Basic_P2P) {
#else
ASSERT_TRUE(notifier.get());
ObjectIdSet ids = ModelTypeSetToObjectIdSet(ModelTypeSet(syncer::BOOKMARKS));
+ notifier->RegisterHandler(&mock_observer_);
notifier->UpdateRegisteredIds(&mock_observer_, ids);
- notifier->UpdateRegisteredIds(&mock_observer_, ObjectIdSet());
+ notifier->UnregisterHandler(&mock_observer_);
#endif
}
« no previous file with comments | « sync/notifier/sync_notifier.h ('k') | sync/notifier/sync_notifier_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698