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

Side by Side Diff: components/sync/engine/model_safe_worker_unittest.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sync/internal_api/public/engine/model_safe_worker.h" 5 #include "components/sync/engine/model_safe_worker.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 namespace syncer { 12 namespace syncer {
13 namespace { 13 namespace {
14 14
15 class ModelSafeWorkerTest : public ::testing::Test { 15 class ModelSafeWorkerTest : public ::testing::Test {};
16 };
17 16
18 TEST_F(ModelSafeWorkerTest, ModelSafeRoutingInfoToValue) { 17 TEST_F(ModelSafeWorkerTest, ModelSafeRoutingInfoToValue) {
19 ModelSafeRoutingInfo routing_info; 18 ModelSafeRoutingInfo routing_info;
20 routing_info[BOOKMARKS] = GROUP_PASSIVE; 19 routing_info[BOOKMARKS] = GROUP_PASSIVE;
21 routing_info[NIGORI] = GROUP_UI; 20 routing_info[NIGORI] = GROUP_UI;
22 routing_info[PREFERENCES] = GROUP_DB; 21 routing_info[PREFERENCES] = GROUP_DB;
23 routing_info[APPS] = GROUP_NON_BLOCKING; 22 routing_info[APPS] = GROUP_NON_BLOCKING;
24 base::DictionaryValue expected_value; 23 base::DictionaryValue expected_value;
25 expected_value.SetString("Apps", "GROUP_NON_BLOCKING"); 24 expected_value.SetString("Apps", "GROUP_NON_BLOCKING");
26 expected_value.SetString("Bookmarks", "GROUP_PASSIVE"); 25 expected_value.SetString("Bookmarks", "GROUP_PASSIVE");
(...skipping 20 matching lines...) Expand all
47 ModelSafeRoutingInfo routing_info; 46 ModelSafeRoutingInfo routing_info;
48 routing_info[BOOKMARKS] = GROUP_PASSIVE; 47 routing_info[BOOKMARKS] = GROUP_PASSIVE;
49 routing_info[NIGORI] = GROUP_UI; 48 routing_info[NIGORI] = GROUP_UI;
50 routing_info[PREFERENCES] = GROUP_DB; 49 routing_info[PREFERENCES] = GROUP_DB;
51 const ModelTypeSet expected_types(BOOKMARKS, NIGORI, PREFERENCES); 50 const ModelTypeSet expected_types(BOOKMARKS, NIGORI, PREFERENCES);
52 EXPECT_EQ(expected_types, GetRoutingInfoTypes(routing_info)); 51 EXPECT_EQ(expected_types, GetRoutingInfoTypes(routing_info));
53 } 52 }
54 53
55 } // namespace 54 } // namespace
56 } // namespace syncer 55 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/engine/model_safe_worker.cc ('k') | components/sync/engine/passive_model_worker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698