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

Unified Diff: ui/events/keycodes/platform_key_map_win_unittest.cc

Issue 2630213003: Return AltGraph for right-Alt keydown/keyup, under layouts which use AltGraph. (Closed)
Patch Set: Add comment Created 3 years, 11 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 | « ui/events/keycodes/platform_key_map_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/keycodes/platform_key_map_win_unittest.cc
diff --git a/ui/events/keycodes/platform_key_map_win_unittest.cc b/ui/events/keycodes/platform_key_map_win_unittest.cc
index 98689d18300618eca5f18ef3aedf123e6df60c81..0de6e119a176d7928e8609b979e5a53fc5fb7087 100644
--- a/ui/events/keycodes/platform_key_map_win_unittest.cc
+++ b/ui/events/keycodes/platform_key_map_win_unittest.cc
@@ -326,4 +326,21 @@ TEST_F(PlatformKeyMapTest, JapaneseSpecificKeys) {
}
}
+TEST_F(PlatformKeyMapTest, AltGraph) {
+ PlatformKeyMap us_keymap(
+ GetPlatformKeyboardLayout(KEYBOARD_LAYOUT_ENGLISH_US));
+ EXPECT_EQ(DomKey::ALT,
+ DomKeyFromKeyboardCodeImpl(us_keymap, VKEY_MENU, EF_ALTGR_DOWN));
+ EXPECT_EQ(DomKey::ALT,
+ DomKeyFromKeyboardCodeImpl(us_keymap, VKEY_MENU,
+ EF_ALTGR_DOWN | EF_IS_EXTENDED_KEY));
+
+ PlatformKeyMap fr_keymap(GetPlatformKeyboardLayout(KEYBOARD_LAYOUT_FRENCH));
+ EXPECT_EQ(DomKey::ALT,
+ DomKeyFromKeyboardCodeImpl(fr_keymap, VKEY_MENU, EF_ALTGR_DOWN));
+ EXPECT_EQ(DomKey::ALT_GRAPH,
+ DomKeyFromKeyboardCodeImpl(fr_keymap, VKEY_MENU,
+ EF_ALTGR_DOWN | EF_IS_EXTENDED_KEY));
+}
+
} // namespace ui
« no previous file with comments | « ui/events/keycodes/platform_key_map_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698