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..1b73ce0eba6b5e35cb970a5af1169cdf7966292d 100644 |
--- a/ui/views/controls/textfield/textfield_unittest.cc |
+++ b/ui/views/controls/textfield/textfield_unittest.cc |
@@ -35,6 +35,7 @@ |
#include "ui/events/event_utils.h" |
#include "ui/events/keycodes/keyboard_codes.h" |
#include "ui/events/test/event_generator.h" |
+#include "ui/events/test/keyboard_layout.h" |
#include "ui/gfx/render_text.h" |
#include "ui/strings/grit/ui_strings.h" |
#include "ui/views/controls/textfield/textfield_controller.h" |
@@ -769,6 +770,12 @@ TEST_F(TextfieldTest, KeyTest) { |
} |
TEST_F(TextfieldTest, KeysWithModifiersTest) { |
+#if defined(OS_WIN) |
+ // Activate U.S. English keyboard layout. Modifier keys in other layouts may |
+ // change the text inserted into a texfield and cause this test to fail. |
Peter Kasting
2016/08/18 17:48:19
Is this really inherently only an OS_WIN problem,
Tomasz Moniuszko
2016/08/26 08:53:12
The problem also exists on other desktop platforms
|
+ ui::ScopedKeyboardLayout keyboard_layout(ui::KEYBOARD_LAYOUT_ENGLISH_US); |
+#endif |
+ |
InitTextfield(); |
const int ctrl = ui::EF_CONTROL_DOWN; |
const int alt = ui::EF_ALT_DOWN; |