OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "chrome/browser/sync/glue/data_type_controller.h" | 11 #include "chrome/browser/sync/glue/data_type_controller.h" |
12 #include "chrome/browser/sync/profile_sync_factory_impl.h" | 12 #include "chrome/browser/sync/profile_sync_factory_impl.h" |
13 #include "chrome/browser/sync/profile_sync_service.h" | 13 #include "chrome/browser/sync/profile_sync_service.h" |
14 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
15 #include "chrome/test/base/testing_browser_process_test.h" | |
16 #include "chrome/test/base/testing_profile.h" | 15 #include "chrome/test/base/testing_profile.h" |
17 #include "content/browser/browser_thread.h" | 16 #include "content/browser/browser_thread.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
19 | 18 |
20 using browser_sync::DataTypeController; | 19 using browser_sync::DataTypeController; |
21 | 20 |
22 class ProfileSyncFactoryImplTest : public TestingBrowserProcessTest { | 21 class ProfileSyncFactoryImplTest : public testing::Test { |
23 protected: | 22 protected: |
24 ProfileSyncFactoryImplTest() | 23 ProfileSyncFactoryImplTest() |
25 : ui_thread_(BrowserThread::UI, &message_loop_) {} | 24 : ui_thread_(BrowserThread::UI, &message_loop_) {} |
26 | 25 |
27 virtual void SetUp() { | 26 virtual void SetUp() { |
28 profile_.reset(new TestingProfile()); | 27 profile_.reset(new TestingProfile()); |
29 FilePath program_path(FILE_PATH_LITERAL("chrome.exe")); | 28 FilePath program_path(FILE_PATH_LITERAL("chrome.exe")); |
30 command_line_.reset(new CommandLine(program_path)); | 29 command_line_.reset(new CommandLine(program_path)); |
31 profile_sync_service_factory_.reset( | 30 profile_sync_service_factory_.reset( |
32 new ProfileSyncFactoryImpl(profile_.get(), command_line_.get())); | 31 new ProfileSyncFactoryImpl(profile_.get(), command_line_.get())); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 132 |
134 TEST_F(ProfileSyncFactoryImplTest, CreatePSSDisableAutofillProfile) { | 133 TEST_F(ProfileSyncFactoryImplTest, CreatePSSDisableAutofillProfile) { |
135 TestSwitchDisablesType(switches::kDisableSyncAutofillProfile, | 134 TestSwitchDisablesType(switches::kDisableSyncAutofillProfile, |
136 syncable::AUTOFILL_PROFILE); | 135 syncable::AUTOFILL_PROFILE); |
137 } | 136 } |
138 | 137 |
139 TEST_F(ProfileSyncFactoryImplTest, CreatePSSDisablePasswords) { | 138 TEST_F(ProfileSyncFactoryImplTest, CreatePSSDisablePasswords) { |
140 TestSwitchDisablesType(switches::kDisableSyncPasswords, | 139 TestSwitchDisablesType(switches::kDisableSyncPasswords, |
141 syncable::PASSWORDS); | 140 syncable::PASSWORDS); |
142 } | 141 } |
OLD | NEW |