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

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

Issue 10837214: Refactor ModelTypePayloadMap and ObjectIdPayloadMap to StateMaps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test Created 8 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
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 5acf46017064525d3c55692f34a5f86c808ef2f4..9c65894b3cec10e441609a081ee6409ab2b14a0c 100644
--- a/sync/internal_api/public/engine/model_safe_worker_unittest.cc
+++ b/sync/internal_api/public/engine/model_safe_worker_unittest.cc
@@ -48,19 +48,19 @@ TEST_F(ModelSafeWorkerTest, GetRoutingInfoTypes) {
EXPECT_TRUE(GetRoutingInfoTypes(routing_info).Equals(expected_types));
}
-TEST_F(ModelSafeWorkerTest, ModelSafeRoutingInfoToPayloadMap) {
+TEST_F(ModelSafeWorkerTest, ModelSafeRoutingInfoToStateMap) {
std::string payload = "test";
ModelSafeRoutingInfo routing_info;
routing_info[BOOKMARKS] = GROUP_PASSIVE;
routing_info[NIGORI] = GROUP_UI;
routing_info[PREFERENCES] = GROUP_DB;
- ModelTypePayloadMap types_with_payloads =
- ModelSafeRoutingInfoToPayloadMap(routing_info, payload);
- ASSERT_EQ(routing_info.size(), types_with_payloads.size());
+ ModelTypeStateMap type_state_map =
+ ModelSafeRoutingInfoToStateMap(routing_info, payload);
+ ASSERT_EQ(routing_info.size(), type_state_map.size());
for (ModelSafeRoutingInfo::iterator iter = routing_info.begin();
iter != routing_info.end();
++iter) {
- EXPECT_EQ(payload, types_with_payloads[iter->first]);
+ EXPECT_EQ(payload, type_state_map[iter->first].payload);
}
}
« no previous file with comments | « sync/internal_api/public/engine/model_safe_worker.cc ('k') | sync/internal_api/public/sessions/sync_session_snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698