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

Unified Diff: sync/notifier/p2p_invalidator_unittest.cc

Issue 23238005: sync: Remove ModelTypeInvalidationMap (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sort entries in gyp files Created 7 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/object_id_invalidation_map_test_util.h ('k') | sync/sessions/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/p2p_invalidator_unittest.cc
diff --git a/sync/notifier/p2p_invalidator_unittest.cc b/sync/notifier/p2p_invalidator_unittest.cc
index be9ee3f970977a3beb929d56349c4720bdaa225f..24cfe027f6cb83df84f6ba26c8e76fcce64d1476 100644
--- a/sync/notifier/p2p_invalidator_unittest.cc
+++ b/sync/notifier/p2p_invalidator_unittest.cc
@@ -8,7 +8,6 @@
#include "jingle/notifier/listener/fake_push_client.h"
#include "sync/internal_api/public/base/model_type.h"
-#include "sync/internal_api/public/base/model_type_invalidation_map.h"
#include "sync/notifier/fake_invalidation_handler.h"
#include "sync/notifier/invalidator_test_template.h"
#include "sync/notifier/object_id_invalidation_map_test_util.h"
@@ -96,8 +95,12 @@ class P2PInvalidatorTest : public testing::Test {
delegate_.GetInvalidator()->UnregisterHandler(&fake_handler_);
}
- ModelTypeInvalidationMap MakeInvalidationMap(ModelTypeSet types) {
- return ModelTypeSetToInvalidationMap(types, std::string());
+ ObjectIdInvalidationMap MakeInvalidationMap(ModelTypeSet types) {
+ ObjectIdInvalidationMap invalidations;
+ ObjectIdSet ids = ModelTypeSetToObjectIdSet(types);
+ return ObjectIdSetToInvalidationMap(ids,
+ Invalidation::kUnknownVersion,
+ std::string());
}
// Simulate receiving all the notifications we sent out since last
@@ -240,8 +243,7 @@ TEST_F(P2PInvalidatorTest, NotificationsBasic) {
ReflectSentNotifications();
EXPECT_EQ(1, fake_handler_.GetInvalidationCount());
EXPECT_THAT(
- ModelTypeInvalidationMapToObjectIdInvalidationMap(
- MakeInvalidationMap(enabled_types)),
+ MakeInvalidationMap(enabled_types),
Eq(fake_handler_.GetLastInvalidationMap()));
// Sent with target NOTIFY_OTHERS so should not be propagated to
@@ -286,10 +288,8 @@ TEST_F(P2PInvalidatorTest, SendNotificationData) {
ReflectSentNotifications();
EXPECT_EQ(1, fake_handler_.GetInvalidationCount());
- EXPECT_THAT(
- ModelTypeInvalidationMapToObjectIdInvalidationMap(
- MakeInvalidationMap(enabled_types)),
- Eq(fake_handler_.GetLastInvalidationMap()));
+ EXPECT_THAT(MakeInvalidationMap(enabled_types),
+ Eq(fake_handler_.GetLastInvalidationMap()));
// Should be dropped.
invalidator->SendNotificationDataForTest(P2PNotificationData());
@@ -297,8 +297,7 @@ TEST_F(P2PInvalidatorTest, SendNotificationData) {
EXPECT_EQ(1, fake_handler_.GetInvalidationCount());
const ObjectIdInvalidationMap& expected_ids =
- ModelTypeInvalidationMapToObjectIdInvalidationMap(
- MakeInvalidationMap(expected_types));
+ MakeInvalidationMap(expected_types);
// Should be propagated.
invalidator->SendNotificationDataForTest(
« no previous file with comments | « sync/notifier/object_id_invalidation_map_test_util.h ('k') | sync/sessions/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698