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

Unified Diff: chrome/test/chromedriver/key_converter_unittest.cc

Issue 2353333002: Reland of Force U.S. English keyboard layout for TextfieldTest.KeysWithModifiersTest (Closed)
Patch Set: Use ScopedCFTypeRef instead of PlatformKeyboardLayout 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 | « chrome/test/chromedriver/BUILD.gn ('k') | chrome/test/chromedriver/keycode_text_conversion_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/key_converter_unittest.cc
diff --git a/chrome/test/chromedriver/key_converter_unittest.cc b/chrome/test/chromedriver/key_converter_unittest.cc
index 27886092430a437e450d9d3ee5018ee2dee1ee8c..4e92d2020495d63d907f998f4ca5c2ebb456e63d 100644
--- a/chrome/test/chromedriver/key_converter_unittest.cc
+++ b/chrome/test/chromedriver/key_converter_unittest.cc
@@ -14,8 +14,8 @@
#include "chrome/test/chromedriver/chrome/status.h"
#include "chrome/test/chromedriver/chrome/ui_events.h"
#include "chrome/test/chromedriver/key_converter.h"
-#include "chrome/test/chromedriver/test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/events/test/keyboard_layout.h"
namespace {
@@ -165,7 +165,6 @@ TEST(KeyConverter, FrenchKeyOnEnglishLayout) {
#if defined(OS_WIN)
TEST(KeyConverter, NeedsCtrlAndAlt) {
- RestoreKeyboardLayoutOnDestruct restore;
int ctrl_and_alt = kControlKeyModifierMask | kAltKeyModifierMask;
KeyEvent event_array[] = {
CreateKeyDownEvent(ui::VKEY_CONTROL, 0),
@@ -175,7 +174,7 @@ TEST(KeyConverter, NeedsCtrlAndAlt) {
CreateKeyUpEvent(ui::VKEY_Q, ctrl_and_alt),
CreateKeyUpEvent(ui::VKEY_MENU, 0),
CreateKeyUpEvent(ui::VKEY_CONTROL, 0)};
- ASSERT_TRUE(SwitchKeyboardLayout("00000407"));
+ ui::ScopedKeyboardLayout keyboard_layout(ui::KEYBOARD_LAYOUT_GERMAN);
CheckEventsReleaseModifiers("@", event_array, arraysize(event_array));
}
#endif
@@ -281,6 +280,7 @@ TEST(KeyConverter, MAYBE_AllShorthandKeys) {
#endif
TEST(KeyConverter, MAYBE_AllEnglishKeyboardSymbols) {
+ ui::ScopedKeyboardLayout keyboard_layout(ui::KEYBOARD_LAYOUT_ENGLISH_US);
base::string16 keys;
const ui::KeyboardCode kSymbolKeyCodes[] = {
ui::VKEY_OEM_3,
« no previous file with comments | « chrome/test/chromedriver/BUILD.gn ('k') | chrome/test/chromedriver/keycode_text_conversion_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698