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 027414eb85f3d82ef077ab7b6c5163fb7bcc2431..e926bb80119febdbadc91ee047dcb79c860f574c 100644 |
--- a/ui/views/controls/textfield/textfield_unittest.cc |
+++ b/ui/views/controls/textfield/textfield_unittest.cc |
@@ -36,6 +36,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" |
@@ -770,6 +771,14 @@ TEST_F(TextfieldTest, KeyTest) { |
} |
TEST_F(TextfieldTest, KeysWithModifiersTest) { |
+#if defined(OS_WIN) || defined(OS_MACOSX) |
+ // 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. |
+ ui::ScopedKeyboardLayout keyboard_layout(ui::KEYBOARD_LAYOUT_ENGLISH_US); |
+#else |
+ // TODO(crbug.com/633136): Switch keyboard layout on other platforms. |
Peter Kasting
2016/08/26 18:54:33
Does this mean that for now, the test is potential
Tomasz Moniuszko
2016/08/31 15:29:42
Test fails only on machines with keyboard layouts
Peter Kasting
2016/08/31 21:16:15
I don't know that that answers my question. I rea
|
+#endif |
+ |
InitTextfield(); |
const int ctrl = ui::EF_CONTROL_DOWN; |
const int alt = ui::EF_ALT_DOWN; |