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

Unified Diff: ui/views/controls/textfield/textfield_unittest.cc

Issue 2197113002: 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, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/textfield_unittest.cc
diff --git a/ui/views/controls/textfield/textfield_unittest.cc b/ui/views/controls/textfield/textfield_unittest.cc
index affd8dc47159c6d0273660df2bac6fd74e2163d5..bf2f6bc6cd1cc9e9df2cf87e30bed3cd301b7784 100644
--- a/ui/views/controls/textfield/textfield_unittest.cc
+++ b/ui/views/controls/textfield/textfield_unittest.cc
@@ -769,6 +769,12 @@ TEST_F(TextfieldTest, KeyTest) {
}
TEST_F(TextfieldTest, KeysWithModifiersTest) {
+#if defined(OS_WIN)
+ // Load U.S. English keyboard layout. Modifier keys in other layouts may
+ // change the text inserted into a texfield and cause this test to fail.
+ ::LoadKeyboardLayout(L"00000409", KLF_ACTIVATE);
Peter Kasting 2016/08/03 00:13:26 Don't you need to call ActivateKeyboardLayout() as
Tomasz Moniuszko 2016/08/18 15:18:10 Done. Code is now shared between chromedriver_test
+#endif
+
InitTextfield();
const int ctrl = ui::EF_CONTROL_DOWN;
const int alt = ui::EF_ALT_DOWN;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698