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

Side by Side Diff: chrome/browser/sync/profile_sync_service_factory_unittest.cc

Issue 2376123003: [Sync] Move //components/sync to the syncer namespace. (Closed)
Patch Set: Rebase. Created 4 years, 2 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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 "chrome/browser/sync/profile_sync_service_factory.h" 5 #include "chrome/browser/sync/profile_sync_service_factory.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 #include "chrome/test/base/testing_profile.h" 13 #include "chrome/test/base/testing_profile.h"
14 #include "components/browser_sync/browser_sync_switches.h" 14 #include "components/browser_sync/browser_sync_switches.h"
15 #include "components/browser_sync/profile_sync_service.h" 15 #include "components/browser_sync/profile_sync_service.h"
16 #include "components/sync/base/model_type.h" 16 #include "components/sync/base/model_type.h"
17 #include "components/sync/driver/data_type_controller.h" 17 #include "components/sync/driver/data_type_controller.h"
18 #include "content/public/test/test_browser_thread_bundle.h" 18 #include "content/public/test/test_browser_thread_bundle.h"
19 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
20 #include "ui/app_list/app_list_switches.h" 20 #include "ui/app_list/app_list_switches.h"
21 21
22 using browser_sync::ProfileSyncService; 22 using browser_sync::ProfileSyncService;
23 using sync_driver::DataTypeController; 23 using syncer::DataTypeController;
24 24
25 class ProfileSyncServiceFactoryTest : public testing::Test { 25 class ProfileSyncServiceFactoryTest : public testing::Test {
26 protected: 26 protected:
27 ProfileSyncServiceFactoryTest() : profile_(new TestingProfile()) {} 27 ProfileSyncServiceFactoryTest() : profile_(new TestingProfile()) {}
28 28
29 // Returns the collection of default datatypes. 29 // Returns the collection of default datatypes.
30 std::vector<syncer::ModelType> DefaultDatatypes() { 30 std::vector<syncer::ModelType> DefaultDatatypes() {
31 std::vector<syncer::ModelType> datatypes; 31 std::vector<syncer::ModelType> datatypes;
32 32
33 // Desktop types. 33 // Desktop types.
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 syncer::ModelTypeSet disabled_types(syncer::AUTOFILL_PROFILE, 142 syncer::ModelTypeSet disabled_types(syncer::AUTOFILL_PROFILE,
143 syncer::BOOKMARKS); 143 syncer::BOOKMARKS);
144 SetDisabledTypes(disabled_types); 144 SetDisabledTypes(disabled_types);
145 ProfileSyncService* pss = ProfileSyncServiceFactory::GetForProfile(profile()); 145 ProfileSyncService* pss = ProfileSyncServiceFactory::GetForProfile(profile());
146 DataTypeController::StateMap controller_states; 146 DataTypeController::StateMap controller_states;
147 pss->GetDataTypeControllerStates(&controller_states); 147 pss->GetDataTypeControllerStates(&controller_states);
148 EXPECT_EQ(DefaultDatatypesCount() - disabled_types.Size(), 148 EXPECT_EQ(DefaultDatatypesCount() - disabled_types.Size(),
149 controller_states.size()); 149 controller_states.size());
150 CheckDefaultDatatypesInMapExcept(&controller_states, disabled_types); 150 CheckDefaultDatatypesInMapExcept(&controller_states, disabled_types);
151 } 151 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_factory.cc ('k') | chrome/browser/sync/profile_sync_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698