Chromium Code Reviews| 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 90cb4f866b03991b086016c9d3e011e84c66cd19..dbb3f3914d84e1ec13a231115e5ff007f4a87d20 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" |
| @@ -765,7 +766,20 @@ TEST_F(TextfieldTest, KeyTest) { |
| EXPECT_STR_EQ("TexT!1!1", textfield_->text()); |
| } |
| -TEST_F(TextfieldTest, KeysWithModifiersTest) { |
| +#if defined(OS_WIN) || defined(OS_MACOSX) |
| +#define MAYBE_KeysWithModifiersTest KeysWithModifiersTest |
| +#else |
| +// TODO(crbug.com/633136): Test can fail with some keyboard layouts. Disable |
| +// test for platforms where changing keyboard layout is not implemented (thus |
| +// U.S. English layout cannot be forced). |
|
Peter Kasting
2016/09/01 20:16:29
Nit: Hmm, this TODO says what's currently happenin
Tomasz Moniuszko
2016/09/08 14:44:41
I reported https://bugs.chromium.org/p/chromium/is
|
| +#define MAYBE_KeysWithModifiersTest DISABLED_KeysWithModifiersTest |
| +#endif |
| + |
| +TEST_F(TextfieldTest, MAYBE_KeysWithModifiersTest) { |
| + // 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); |
| + |
| InitTextfield(); |
| const int ctrl = ui::EF_CONTROL_DOWN; |
| const int alt = ui::EF_ALT_DOWN; |