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

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: Remove now-unneeded param Created 8 years, 5 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: 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..9ba2a5cd05fe6e8725e423a62a990d2dbf187a74 100644
--- a/sync/notifier/sync_notifier_factory_unittest.cc
+++ b/sync/notifier/sync_notifier_factory_unittest.cc
@@ -29,6 +29,8 @@ using ::testing::Mock;
using ::testing::NiceMock;
using ::testing::StrictMock;
+const char kHandlerName[] = "MockObserver";
+
class SyncNotifierFactoryTest : public testing::Test {
protected:
@@ -61,8 +63,9 @@ TEST_F(SyncNotifierFactoryTest, Basic) {
#else
ASSERT_TRUE(notifier.get());
ObjectIdSet ids = ModelTypeSetToObjectIdSet(ModelTypeSet(syncer::BOOKMARKS));
- notifier->UpdateRegisteredIds(&mock_observer_, ids);
- notifier->UpdateRegisteredIds(&mock_observer_, ObjectIdSet());
+ notifier->SetHandler(kHandlerName, &mock_observer_);
+ notifier->UpdateRegisteredIds(kHandlerName, ids);
+ notifier->SetHandler(kHandlerName, NULL);
#endif
}
@@ -79,8 +82,9 @@ TEST_F(SyncNotifierFactoryTest, Basic_P2P) {
#else
ASSERT_TRUE(notifier.get());
ObjectIdSet ids = ModelTypeSetToObjectIdSet(ModelTypeSet(syncer::BOOKMARKS));
- notifier->UpdateRegisteredIds(&mock_observer_, ids);
- notifier->UpdateRegisteredIds(&mock_observer_, ObjectIdSet());
+ notifier->SetHandler(kHandlerName, &mock_observer_);
+ notifier->UpdateRegisteredIds(kHandlerName, ids);
+ notifier->SetHandler(kHandlerName, NULL);
#endif
}

Powered by Google App Engine
This is Rietveld 408576698