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

Unified Diff: components/sync/user_events/user_event_sync_bridge_unittest.cc

Issue 2916133002: [Sync] Support commit only types. (Closed)
Patch Set: Rebase again. Created 3 years, 6 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 | « components/sync/user_events/user_event_sync_bridge.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/user_events/user_event_sync_bridge_unittest.cc
diff --git a/components/sync/user_events/user_event_sync_bridge_unittest.cc b/components/sync/user_events/user_event_sync_bridge_unittest.cc
index 31b81f6061da79ed7eb9e0034ffb66be01a8e8db..33443cce12afc73d3b5f5367037ccf3e80195bf6 100644
--- a/components/sync/user_events/user_event_sync_bridge_unittest.cc
+++ b/components/sync/user_events/user_event_sync_bridge_unittest.cc
@@ -128,6 +128,19 @@ TEST_F(UserEventSyncBridgeTest, MultipleRecords) {
bridge()->GetAllData(base::Bind(&VerifyDataBatchCount, 4));
}
+TEST_F(UserEventSyncBridgeTest, ApplySyncChanges) {
+ bridge()->RecordUserEvent(SpecificsUniquePtr(1u, 1u, 1u));
+ bridge()->RecordUserEvent(SpecificsUniquePtr(2u, 2u, 2u));
+ bridge()->GetAllData(base::Bind(&VerifyDataBatchCount, 2));
+
+ const std::string storage_key = processor().put_multimap().begin()->first;
+ auto error_on_delete =
+ bridge()->ApplySyncChanges(bridge()->CreateMetadataChangeList(),
+ {EntityChange::CreateDelete(storage_key)});
+ EXPECT_FALSE(error_on_delete);
+ bridge()->GetAllData(base::Bind(&VerifyDataBatchCount, 1));
+}
+
} // namespace
} // namespace syncer
« no previous file with comments | « components/sync/user_events/user_event_sync_bridge.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698