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

Side by Side Diff: chrome/browser/chromeos/preferences_browsertest.cc

Issue 287083003: Multi-profile flag cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src
Patch Set: Created 6 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <sys/types.h> 5 #include <sys/types.h>
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/chromeos/input_method/input_method_manager_impl.h" 12 #include "chrome/browser/chromeos/input_method/input_method_manager_impl.h"
13 #include "chrome/browser/chromeos/login/login_manager_test.h" 13 #include "chrome/browser/chromeos/login/login_manager_test.h"
14 #include "chrome/browser/chromeos/login/startup_utils.h" 14 #include "chrome/browser/chromeos/login/startup_utils.h"
15 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" 15 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h"
16 #include "chrome/browser/chromeos/preferences.h" 16 #include "chrome/browser/chromeos/preferences.h"
17 #include "chrome/browser/chromeos/settings/cros_settings.h" 17 #include "chrome/browser/chromeos/settings/cros_settings.h"
18 #include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h" 18 #include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h"
19 #include "chrome/browser/chromeos/system/fake_input_device_settings.h" 19 #include "chrome/browser/chromeos/system/fake_input_device_settings.h"
20 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h" 20 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h"
21 #include "chrome/common/chrome_switches.h" 21 #include "chrome/common/chrome_switches.h"
Nikita (slow) 2014/05/19 14:27:15 nit: not used
22 #include "chrome/common/pref_names.h" 22 #include "chrome/common/pref_names.h"
23 #include "chromeos/chromeos_switches.h" 23 #include "chromeos/chromeos_switches.h"
24 #include "chromeos/ime/fake_ime_keyboard.h" 24 #include "chromeos/ime/fake_ime_keyboard.h"
25 #include "components/feedback/tracing_manager.h" 25 #include "components/feedback/tracing_manager.h"
26 #include "content/public/test/test_utils.h" 26 #include "content/public/test/test_utils.h"
27 #include "testing/gtest/include/gtest/gtest.h" 27 #include "testing/gtest/include/gtest/gtest.h"
28 #include "ui/events/event_utils.h" 28 #include "ui/events/event_utils.h"
29 29
30 namespace chromeos { 30 namespace chromeos {
31 31
32 namespace { 32 namespace {
33 33
34 const char* kTestUsers[] = {"test-user1@gmail.com", "test-user2@gmail.com"}; 34 const char* kTestUsers[] = {"test-user1@gmail.com", "test-user2@gmail.com"};
35 35
36 } // namespace 36 } // namespace
37 37
38 class PreferencesTest : public LoginManagerTest { 38 class PreferencesTest : public LoginManagerTest {
39 public: 39 public:
40 PreferencesTest() 40 PreferencesTest()
41 : LoginManagerTest(true), 41 : LoginManagerTest(true),
42 input_settings_(NULL), 42 input_settings_(NULL),
43 keyboard_(NULL) {} 43 keyboard_(NULL) {}
44 44
45 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 45 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
46 LoginManagerTest::SetUpCommandLine(command_line); 46 LoginManagerTest::SetUpCommandLine(command_line);
47 command_line->AppendSwitch(::switches::kMultiProfiles);
48 command_line->AppendSwitch(switches::kStubCrosSettings); 47 command_line->AppendSwitch(switches::kStubCrosSettings);
49 } 48 }
50 49
51 virtual void SetUpOnMainThread() OVERRIDE { 50 virtual void SetUpOnMainThread() OVERRIDE {
52 LoginManagerTest::SetUpOnMainThread(); 51 LoginManagerTest::SetUpOnMainThread();
53 input_settings_ = new system::FakeInputDeviceSettings(); 52 input_settings_ = new system::FakeInputDeviceSettings();
54 system::InputDeviceSettings::SetSettingsForTesting(input_settings_); 53 system::InputDeviceSettings::SetSettingsForTesting(input_settings_);
55 keyboard_ = new input_method::FakeImeKeyboard(); 54 keyboard_ = new input_method::FakeImeKeyboard();
56 static_cast<input_method::InputMethodManagerImpl*>( 55 static_cast<input_method::InputMethodManagerImpl*>(
57 input_method::InputMethodManager::Get()) 56 input_method::InputMethodManager::Get())
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 !prefs1->GetBoolean(prefs::kTapToClickEnabled)); 196 !prefs1->GetBoolean(prefs::kTapToClickEnabled));
198 CheckLocalStateCorrespondsToPrefs(prefs1); 197 CheckLocalStateCorrespondsToPrefs(prefs1);
199 198
200 // Switch user back. 199 // Switch user back.
201 user_manager->SwitchActiveUser(kTestUsers[0]); 200 user_manager->SwitchActiveUser(kTestUsers[0]);
202 CheckSettingsCorrespondToPrefs(prefs1); 201 CheckSettingsCorrespondToPrefs(prefs1);
203 CheckLocalStateCorrespondsToPrefs(prefs1); 202 CheckLocalStateCorrespondsToPrefs(prefs1);
204 } 203 }
205 204
206 } // namespace chromeos 205 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698