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

Unified Diff: sync/notifier/registration_manager_unittest.cc

Issue 10824140: Add InvalidationStateTracker::Forget() to erase an entry from storage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix sync_client target Created 8 years, 3 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/registration_manager.cc ('k') | sync/tools/sync_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/registration_manager_unittest.cc
diff --git a/sync/notifier/registration_manager_unittest.cc b/sync/notifier/registration_manager_unittest.cc
index 4041501d9f837d33da652b45b9985cd576da4b99..170000052dba3ed0361b3398e3357b56076f1bc6 100644
--- a/sync/notifier/registration_manager_unittest.cc
+++ b/sync/notifier/registration_manager_unittest.cc
@@ -238,13 +238,19 @@ TEST_F(RegistrationManagerTest, UpdateRegisteredIds) {
EXPECT_TRUE(fake_registration_manager_.GetRegisteredIdsForTest().empty());
EXPECT_TRUE(fake_invalidation_client_.GetRegisteredIdsForTest().empty());
- fake_registration_manager_.UpdateRegisteredIds(ids);
+ ObjectIdSet expected_unregistered_ids;
+
+ ObjectIdSet unregistered_ids =
+ fake_registration_manager_.UpdateRegisteredIds(ids);
+ EXPECT_EQ(expected_unregistered_ids, unregistered_ids);
EXPECT_EQ(ids, fake_registration_manager_.GetRegisteredIdsForTest());
EXPECT_EQ(ids, fake_invalidation_client_.GetRegisteredIdsForTest());
ids.insert(GetIdForIndex(kObjectIdsCount - 1));
ids.erase(GetIdForIndex(kObjectIdsCount - 2));
- fake_registration_manager_.UpdateRegisteredIds(ids);
+ unregistered_ids = fake_registration_manager_.UpdateRegisteredIds(ids);
+ expected_unregistered_ids.insert(GetIdForIndex(kObjectIdsCount - 2));
+ EXPECT_EQ(expected_unregistered_ids, unregistered_ids);
EXPECT_EQ(ids, fake_registration_manager_.GetRegisteredIdsForTest());
EXPECT_EQ(ids, fake_invalidation_client_.GetRegisteredIdsForTest());
}
« no previous file with comments | « sync/notifier/registration_manager.cc ('k') | sync/tools/sync_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698