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

Unified Diff: sync/engine/directory_update_handler_unittest.cc

Issue 215973007: [Sync] Add plumbing of context from client to server (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile Created 6 years, 9 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/engine/directory_update_handler.cc ('k') | sync/engine/get_updates_processor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/directory_update_handler_unittest.cc
diff --git a/sync/engine/directory_update_handler_unittest.cc b/sync/engine/directory_update_handler_unittest.cc
index ada49e16d389911372ebecd9bac6a5fc4a469ac2..6d1b35a1994301102e13fbfcefd298a9233f63da 100644
--- a/sync/engine/directory_update_handler_unittest.cc
+++ b/sync/engine/directory_update_handler_unittest.cc
@@ -251,6 +251,12 @@ TEST_F(DirectoryUpdateHandlerProcessUpdateTest, GarbageCollectionByVersion) {
progress.set_token("token");
progress.mutable_gc_directive()->set_version_watermark(kDefaultVersion + 10);
+ sync_pb::DataTypeContext context;
+ context.set_data_type_id(
+ GetSpecificsFieldNumberFromModelType(SYNCED_NOTIFICATIONS));
+ context.set_context("context");
+ context.set_version(1);
+
scoped_ptr<sync_pb::SyncEntity> type_root =
CreateUpdate(SyncableIdToProto(syncable::Id::CreateFromServerId("root")),
syncable::GetNullId().GetServerId(),
@@ -277,7 +283,7 @@ TEST_F(DirectoryUpdateHandlerProcessUpdateTest, GarbageCollectionByVersion) {
updates.push_back(e2.get());
// Process and apply updates.
- handler.ProcessGetUpdatesResponse(progress, updates, &status);
+ handler.ProcessGetUpdatesResponse(progress, context, updates, &status);
handler.ApplyUpdates(&status);
// Verify none is deleted because they are unapplied during GC.
@@ -287,7 +293,8 @@ TEST_F(DirectoryUpdateHandlerProcessUpdateTest, GarbageCollectionByVersion) {
// Process and apply again. Old entry is deleted but not root.
progress.mutable_gc_directive()->set_version_watermark(kDefaultVersion + 20);
- handler.ProcessGetUpdatesResponse(progress, SyncEntityList(), &status);
+ handler.ProcessGetUpdatesResponse(
+ progress, context, SyncEntityList(), &status);
handler.ApplyUpdates(&status);
EXPECT_TRUE(EntryExists(type_root->id_string()));
EXPECT_FALSE(EntryExists(e1->id_string()));
« no previous file with comments | « sync/engine/directory_update_handler.cc ('k') | sync/engine/get_updates_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698