| 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 b1036b506175f72cf1d830e82c8e14ae0f431b70..5acf46017064525d3c55692f34a5f86c808ef2f4 100644
|
| --- a/sync/internal_api/public/engine/model_safe_worker_unittest.cc
|
| +++ b/sync/internal_api/public/engine/model_safe_worker_unittest.cc
|
| @@ -16,9 +16,9 @@ class ModelSafeWorkerTest : public ::testing::Test {
|
|
|
| TEST_F(ModelSafeWorkerTest, ModelSafeRoutingInfoToValue) {
|
| ModelSafeRoutingInfo routing_info;
|
| - routing_info[syncer::BOOKMARKS] = GROUP_PASSIVE;
|
| - routing_info[syncer::NIGORI] = GROUP_UI;
|
| - routing_info[syncer::PREFERENCES] = GROUP_DB;
|
| + routing_info[BOOKMARKS] = GROUP_PASSIVE;
|
| + routing_info[NIGORI] = GROUP_UI;
|
| + routing_info[PREFERENCES] = GROUP_DB;
|
| DictionaryValue expected_value;
|
| expected_value.SetString("Bookmarks", "GROUP_PASSIVE");
|
| expected_value.SetString("Encryption keys", "GROUP_UI");
|
| @@ -30,9 +30,9 @@ TEST_F(ModelSafeWorkerTest, ModelSafeRoutingInfoToValue) {
|
|
|
| TEST_F(ModelSafeWorkerTest, ModelSafeRoutingInfoToString) {
|
| ModelSafeRoutingInfo routing_info;
|
| - routing_info[syncer::BOOKMARKS] = GROUP_PASSIVE;
|
| - routing_info[syncer::NIGORI] = GROUP_UI;
|
| - routing_info[syncer::PREFERENCES] = GROUP_DB;
|
| + routing_info[BOOKMARKS] = GROUP_PASSIVE;
|
| + routing_info[NIGORI] = GROUP_UI;
|
| + routing_info[PREFERENCES] = GROUP_DB;
|
| EXPECT_EQ(
|
| "{\"Bookmarks\":\"GROUP_PASSIVE\",\"Encryption keys\":\"GROUP_UI\","
|
| "\"Preferences\":\"GROUP_DB\"}",
|
| @@ -41,23 +41,20 @@ TEST_F(ModelSafeWorkerTest, ModelSafeRoutingInfoToString) {
|
|
|
| TEST_F(ModelSafeWorkerTest, GetRoutingInfoTypes) {
|
| ModelSafeRoutingInfo routing_info;
|
| - routing_info[syncer::BOOKMARKS] = GROUP_PASSIVE;
|
| - routing_info[syncer::NIGORI] = GROUP_UI;
|
| - routing_info[syncer::PREFERENCES] = GROUP_DB;
|
| - const syncer::ModelTypeSet expected_types(
|
| - syncer::BOOKMARKS,
|
| - syncer::NIGORI,
|
| - syncer::PREFERENCES);
|
| + routing_info[BOOKMARKS] = GROUP_PASSIVE;
|
| + routing_info[NIGORI] = GROUP_UI;
|
| + routing_info[PREFERENCES] = GROUP_DB;
|
| + const ModelTypeSet expected_types(BOOKMARKS, NIGORI, PREFERENCES);
|
| EXPECT_TRUE(GetRoutingInfoTypes(routing_info).Equals(expected_types));
|
| }
|
|
|
| TEST_F(ModelSafeWorkerTest, ModelSafeRoutingInfoToPayloadMap) {
|
| std::string payload = "test";
|
| ModelSafeRoutingInfo routing_info;
|
| - routing_info[syncer::BOOKMARKS] = GROUP_PASSIVE;
|
| - routing_info[syncer::NIGORI] = GROUP_UI;
|
| - routing_info[syncer::PREFERENCES] = GROUP_DB;
|
| - syncer::ModelTypePayloadMap types_with_payloads =
|
| + 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());
|
| for (ModelSafeRoutingInfo::iterator iter = routing_info.begin();
|
|
|