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

Side by Side Diff: chrome/browser/chromeos/login/oobe_localization_browsertest.cc

Issue 218623015: [IME] InputMethodUtil should cache the hardware layouts from VPD, instead of the filtered hardware … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed test failures. Created 6 years, 8 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 | Annotate | Revision Log
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 "base/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "base/prefs/pref_service.h" 6 #include "base/prefs/pref_service.h"
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/task_runner.h" 8 #include "base/task_runner.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 const std::string& expected_locale, 218 const std::string& expected_locale,
219 const std::string& expected_keyboard_layout, 219 const std::string& expected_keyboard_layout,
220 const std::string& expected_keyboard_select_control) { 220 const std::string& expected_keyboard_select_control) {
221 statistics_provider_->set_locale(initial_locale); 221 statistics_provider_->set_locale(initial_locale);
222 statistics_provider_->set_keyboard_layout(keyboard_layout); 222 statistics_provider_->set_keyboard_layout(keyboard_layout);
223 223
224 // Initialize StartupCustomizationDocument with fake statistics provider. 224 // Initialize StartupCustomizationDocument with fake statistics provider.
225 StartupCustomizationDocument::GetInstance()->Init( 225 StartupCustomizationDocument::GetInstance()->Init(
226 statistics_provider_.get()); 226 statistics_provider_.get());
227 227
228 g_browser_process->local_state()->SetString(
229 prefs::kHardwareKeyboardLayout, keyboard_layout);
230
228 input_method::InputMethodManager::Get() 231 input_method::InputMethodManager::Get()
229 ->GetInputMethodUtil() 232 ->GetInputMethodUtil()
230 ->InitXkbInputMethodsForTesting(); 233 ->InitXkbInputMethodsForTesting();
231 234
232 std::string expected_keyboard_select = expected_keyboard_select_control; 235 std::string expected_keyboard_select = expected_keyboard_select_control;
233 if (extension_ime_util::UseWrappedExtensionKeyboardLayouts()) { 236 if (extension_ime_util::UseWrappedExtensionKeyboardLayouts()) {
234 // Modifies the expected keyboard select control options for the new 237 // Modifies the expected keyboard select control options for the new
235 // extension based xkb id. 238 // extension based xkb id.
236 size_t pos = 0; 239 size_t pos = 0;
237 std::string repl_old = "xkb:"; 240 std::string repl_old = "xkb:";
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 RunLocalizationTest("es,en-US,nl", "xkb:be::nld", 329 RunLocalizationTest("es,en-US,nl", "xkb:be::nld",
327 "es,en-US,nl", "xkb:be::nld", 330 "es,en-US,nl", "xkb:be::nld",
328 "xkb:be::nld,[xkb:es::spa,xkb:latam::spa,xkb:us::eng]"); 331 "xkb:be::nld,[xkb:es::spa,xkb:latam::spa,xkb:us::eng]");
329 332
330 RunLocalizationTest("ru,de", "xkb:ru::rus", 333 RunLocalizationTest("ru,de", "xkb:ru::rus",
331 "ru,de", kUSLayout, 334 "ru,de", kUSLayout,
332 "xkb:us::eng"); 335 "xkb:us::eng");
333 } 336 }
334 337
335 } // namespace chromeos 338 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698