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

Unified Diff: ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine_unittest.cc

Issue 1566463002: Generate located Windows keycodes for number pad keys under Ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/ozone/layout/xkb/xkb_keyboard_layout_engine.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine_unittest.cc
diff --git a/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine_unittest.cc b/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine_unittest.cc
index ccbd64556232d279b066e5e46607326be4782884..225635de780133951980fc7c2c86b64e6f55374a 100644
--- a/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine_unittest.cc
+++ b/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine_unittest.cc
@@ -45,6 +45,7 @@ class VkTestXkbKeyboardLayoutEngine : public XkbKeyboardLayoutEngine {
struct KeysymEntry {
DomCode dom_code;
xkb_keysym_t keysym;
+ base::char16 character;
};
struct RuleNames {
@@ -128,7 +129,7 @@ class VkTestXkbKeyboardLayoutEngine : public XkbKeyboardLayoutEngine {
return false;
}
*xkb_keysym = keysym_entry_->keysym;
- *character = 0;
+ *character = keysym_entry_->character;
return true;
}
return false;
@@ -815,6 +816,9 @@ TEST_F(XkbLayoutEngineVkTest, KeyboardCodeForNonPrintable) {
{{DomCode::ENTER, XKB_KEY_Return}, VKEY_RETURN},
{{DomCode::NUMPAD_ENTER, XKB_KEY_KP_Enter}, VKEY_RETURN},
{{DomCode::SLEEP, XKB_KEY_XF86Sleep}, VKEY_SLEEP},
+ // Verify that number pad digits produce located VKEY codes.
+ {{DomCode::NUMPAD0, XKB_KEY_KP_0, '0'}, VKEY_NUMPAD0},
+ {{DomCode::NUMPAD9, XKB_KEY_KP_9, '9'}, VKEY_NUMPAD9},
};
for (const auto& e : kVkeyTestCase) {
SCOPED_TRACE(static_cast<int>(e.test.dom_code));
« no previous file with comments | « ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698