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

Unified Diff: sync/internal_api/public/engine/model_safe_worker_unittest.cc

Issue 10690071: [Sync] Move model_type* from syncable/ to base/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « sync/internal_api/public/engine/model_safe_worker.cc ('k') | sync/internal_api/public/engine/sync_status.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/public/engine/model_safe_worker_unittest.cc
diff --git a/sync/internal_api/public/engine/model_safe_worker_unittest.cc b/sync/internal_api/public/engine/model_safe_worker_unittest.cc
index 550c1b26443a79849df410b3959fccc27146c830..a25e0b1133785af6cc2048f665135d64103bb457 100644
--- a/sync/internal_api/public/engine/model_safe_worker_unittest.cc
+++ b/sync/internal_api/public/engine/model_safe_worker_unittest.cc
@@ -51,5 +51,21 @@ TEST_F(ModelSafeWorkerTest, GetRoutingInfoTypes) {
EXPECT_TRUE(GetRoutingInfoTypes(routing_info).Equals(expected_types));
}
+TEST_F(ModelSafeWorkerTest, ModelSafeRoutingInfoToPayloadMap) {
+ std::string payload = "test";
+ ModelSafeRoutingInfo routing_info;
+ routing_info[syncable::BOOKMARKS] = GROUP_PASSIVE;
+ routing_info[syncable::NIGORI] = GROUP_UI;
+ routing_info[syncable::PREFERENCES] = GROUP_DB;
+ syncable::ModelTypePayloadMap types_with_payloads =
+ ModelSafeRoutingInfoToPayloadMap(routing_info, payload);
+ ASSERT_EQ(routing_info.size(), types_with_payloads.size());
+ for (ModelSafeRoutingInfo::iterator iter = routing_info.begin();
+ iter != routing_info.end();
+ ++iter) {
+ EXPECT_EQ(payload, types_with_payloads[iter->first]);
+ }
+}
+
} // namespace
} // namespace syncer
« no previous file with comments | « sync/internal_api/public/engine/model_safe_worker.cc ('k') | sync/internal_api/public/engine/sync_status.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698