diff options
Diffstat (limited to 'sync/engine/get_updates_processor_unittest.cc')
-rw-r--r-- | sync/engine/get_updates_processor_unittest.cc | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sync/engine/get_updates_processor_unittest.cc b/sync/engine/get_updates_processor_unittest.cc index 7c87fed..54ce503 100644 --- a/sync/engine/get_updates_processor_unittest.cc +++ b/sync/engine/get_updates_processor_unittest.cc @@ -15,11 +15,23 @@ #include "sync/sessions/status_controller.h" #include "sync/test/engine/fake_model_worker.h" #include "sync/test/engine/mock_update_handler.h" +#include "sync/test/mock_invalidation.h" #include "sync/test/sessions/mock_debug_info_getter.h" #include "testing/gtest/include/gtest/gtest.h" namespace syncer { +namespace { + +scoped_ptr<InvalidationInterface> BuildInvalidation( + int64 version, + const std::string& payload) { + return MockInvalidation::Build(version, payload) + .PassAs<InvalidationInterface>(); +} + +} // namespace + using sessions::MockDebugInfoGetter; // A test fixture for tests exercising download updates functions. @@ -133,11 +145,11 @@ TEST_F(GetUpdatesProcessorTest, BookmarkNudge) { TEST_F(GetUpdatesProcessorTest, NotifyMany) { sessions::NudgeTracker nudge_tracker; nudge_tracker.RecordRemoteInvalidation( - BuildInvalidationMap(AUTOFILL, 1, "autofill_payload")); + AUTOFILL, BuildInvalidation(1, "autofill_payload")); nudge_tracker.RecordRemoteInvalidation( - BuildInvalidationMap(BOOKMARKS, 1, "bookmark_payload")); + BOOKMARKS, BuildInvalidation(1, "bookmark_payload")); nudge_tracker.RecordRemoteInvalidation( - BuildInvalidationMap(PREFERENCES, 1, "preferences_payload")); + PREFERENCES, BuildInvalidation(1, "preferences_payload")); ModelTypeSet notified_types; notified_types.Put(AUTOFILL); notified_types.Put(BOOKMARKS); |