OLD | NEW |
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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/prefs/pref_service.h" | 6 #include "base/prefs/pref_service.h" |
7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
8 #include "chrome/browser/chromeos/input_method/input_method_persistence.h" | 8 #include "chrome/browser/chromeos/input_method/input_method_persistence.h" |
9 #include "chrome/browser/chromeos/language_preferences.h" | 9 #include "chrome/browser/chromeos/language_preferences.h" |
10 #include "chrome/browser/chromeos/login/login_manager_test.h" | 10 #include "chrome/browser/chromeos/login/login_manager_test.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 scoped_refptr<content::MessageLoopRunner> runner_; | 81 scoped_refptr<content::MessageLoopRunner> runner_; |
82 }; | 82 }; |
83 | 83 |
84 } // anonymous namespace | 84 } // anonymous namespace |
85 | 85 |
86 class LoginUIKeyboardTest : public chromeos::LoginManagerTest { | 86 class LoginUIKeyboardTest : public chromeos::LoginManagerTest { |
87 public: | 87 public: |
88 LoginUIKeyboardTest() : LoginManagerTest(false) {} | 88 LoginUIKeyboardTest() : LoginManagerTest(false) {} |
89 virtual ~LoginUIKeyboardTest() {} | 89 virtual ~LoginUIKeyboardTest() {} |
90 | 90 |
91 virtual void SetUpOnMainThread() OVERRIDE { | 91 virtual void SetUpOnMainThread() override { |
92 user_input_methods.push_back("xkb:fr::fra"); | 92 user_input_methods.push_back("xkb:fr::fra"); |
93 user_input_methods.push_back("xkb:de::ger"); | 93 user_input_methods.push_back("xkb:de::ger"); |
94 | 94 |
95 chromeos::input_method::InputMethodManager::Get()->MigrateInputMethods( | 95 chromeos::input_method::InputMethodManager::Get()->MigrateInputMethods( |
96 &user_input_methods); | 96 &user_input_methods); |
97 | 97 |
98 LoginManagerTest::SetUpOnMainThread(); | 98 LoginManagerTest::SetUpOnMainThread(); |
99 } | 99 } |
100 | 100 |
101 // Should be called from PRE_ test so that local_state is saved to disk, and | 101 // Should be called from PRE_ test so that local_state is saved to disk, and |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 ->GetActiveIMEState() | 171 ->GetActiveIMEState() |
172 ->GetCurrentInputMethod() | 172 ->GetCurrentInputMethod() |
173 .id()); | 173 .id()); |
174 } | 174 } |
175 | 175 |
176 class LoginUIKeyboardTestWithUsersAndOwner : public chromeos::LoginManagerTest { | 176 class LoginUIKeyboardTestWithUsersAndOwner : public chromeos::LoginManagerTest { |
177 public: | 177 public: |
178 LoginUIKeyboardTestWithUsersAndOwner() : LoginManagerTest(false) {} | 178 LoginUIKeyboardTestWithUsersAndOwner() : LoginManagerTest(false) {} |
179 virtual ~LoginUIKeyboardTestWithUsersAndOwner() {} | 179 virtual ~LoginUIKeyboardTestWithUsersAndOwner() {} |
180 | 180 |
181 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 181 virtual void SetUpCommandLine(CommandLine* command_line) override { |
182 LoginManagerTest::SetUpCommandLine(command_line); | 182 LoginManagerTest::SetUpCommandLine(command_line); |
183 command_line->AppendSwitch(switches::kStubCrosSettings); | 183 command_line->AppendSwitch(switches::kStubCrosSettings); |
184 | 184 |
185 LoginManagerTest::SetUpCommandLine(command_line); | 185 LoginManagerTest::SetUpCommandLine(command_line); |
186 } | 186 } |
187 | 187 |
188 virtual void SetUpOnMainThread() OVERRIDE { | 188 virtual void SetUpOnMainThread() override { |
189 user_input_methods.push_back("xkb:fr::fra"); | 189 user_input_methods.push_back("xkb:fr::fra"); |
190 user_input_methods.push_back("xkb:de::ger"); | 190 user_input_methods.push_back("xkb:de::ger"); |
191 user_input_methods.push_back("xkb:pl::pol"); | 191 user_input_methods.push_back("xkb:pl::pol"); |
192 | 192 |
193 chromeos::input_method::InputMethodManager::Get()->MigrateInputMethods( | 193 chromeos::input_method::InputMethodManager::Get()->MigrateInputMethods( |
194 &user_input_methods); | 194 &user_input_methods); |
195 | 195 |
196 CrosSettings::Get()->SetString(kDeviceOwner, kTestUser3); | 196 CrosSettings::Get()->SetString(kDeviceOwner, kTestUser3); |
197 | 197 |
198 LoginManagerTest::SetUpOnMainThread(); | 198 LoginManagerTest::SetUpOnMainThread(); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 // Switch back. | 269 // Switch back. |
270 js_checker().Evaluate("$('cancel-add-user-button').click()"); | 270 js_checker().Evaluate("$('cancel-add-user-button').click()"); |
271 OobeScreenWaiter(OobeDisplay::SCREEN_ACCOUNT_PICKER).Wait(); | 271 OobeScreenWaiter(OobeDisplay::SCREEN_ACCOUNT_PICKER).Wait(); |
272 | 272 |
273 EXPECT_EQ(expected_input_methods, | 273 EXPECT_EQ(expected_input_methods, |
274 input_method::InputMethodManager::Get() | 274 input_method::InputMethodManager::Get() |
275 ->GetActiveIMEState() | 275 ->GetActiveIMEState() |
276 ->GetActiveInputMethodIds()); | 276 ->GetActiveInputMethodIds()); |
277 } | 277 } |
278 } // namespace chromeos | 278 } // namespace chromeos |
OLD | NEW |