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

Unified Diff: ui/events/test/keyboard_layout_win.cc

Issue 2349253002: Revert of Force U.S. English keyboard layout for TextfieldTest.KeysWithModifiersTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/test/keyboard_layout_mac.cc ('k') | ui/views/controls/textfield/textfield_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/test/keyboard_layout_win.cc
diff --git a/ui/events/test/keyboard_layout_win.cc b/ui/events/test/keyboard_layout_win.cc
deleted file mode 100644
index 0de0fdb389f25499634c03669d887b285561c3f0..0000000000000000000000000000000000000000
--- a/ui/events/test/keyboard_layout_win.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/events/test/keyboard_layout.h"
-
-#include "base/logging.h"
-
-namespace ui {
-
-// |LoadKeyboardLayout()| ensures the locale to be loaded into the system
-// (Similar to temporarily adding a locale in Control Panel), otherwise
-// |ToUnicodeEx()| will fall-back to the default locale.
-// See MSDN LoadKeyboardLayout():
-// https://msdn.microsoft.com/en-us/library/windows/desktop/ms646305(v=vs.85).aspx
-// And language constants and strings:
-// https://msdn.microsoft.com/en-us/library/windows/desktop/dd318693(v=vs.85).aspx
-PlatformKeyboardLayout GetPlatformKeyboardLayout(KeyboardLayout layout) {
- switch (layout) {
- case KEYBOARD_LAYOUT_ENGLISH_US:
- return LoadKeyboardLayout(L"00000409", KLF_ACTIVATE);
- case KEYBOARD_LAYOUT_FRENCH:
- return LoadKeyboardLayout(L"0000040c", KLF_ACTIVATE);
- case KEYBOARD_LAYOUT_GERMAN:
- return LoadKeyboardLayout(L"00000407", KLF_ACTIVATE);
- case KEYBOARD_LAYOUT_GREEK:
- return LoadKeyboardLayout(L"00000408", KLF_ACTIVATE);
- case KEYBOARD_LAYOUT_JAPANESE:
- return LoadKeyboardLayout(L"00000411", KLF_ACTIVATE);
- case KEYBOARD_LAYOUT_KOREAN:
- return LoadKeyboardLayout(L"00000412", KLF_ACTIVATE);
- case KEYBOARD_LAYOUT_RUSSIAN:
- return LoadKeyboardLayout(L"00000419", KLF_ACTIVATE);
- }
-
- NOTREACHED();
- return 0;
-}
-
-PlatformKeyboardLayout ScopedKeyboardLayout::GetActiveLayout() {
- return GetKeyboardLayout(0);
-}
-
-void ScopedKeyboardLayout::ActivateLayout(PlatformKeyboardLayout layout) {
- DCHECK(layout);
- HKL result = ActivateKeyboardLayout(layout, 0);
- DCHECK(!!result);
-}
-
-} // namespace ui
« no previous file with comments | « ui/events/test/keyboard_layout_mac.cc ('k') | ui/views/controls/textfield/textfield_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698