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

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

Issue 954943003: [KeyboardEvent] Use DOM |code| rather than Windows-based key code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added missing VKEY in windows for brightness and power Created 5 years, 10 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') | ui/events/test/event_generator.cc » ('j') | 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 87b4c55e89f5925ec6e10d1b03f5f757b2831539..f736d4c874102f543876bc7432662626507c58d5 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
@@ -7,7 +7,6 @@
#include "ui/events/keycodes/dom3/dom_code.h"
#include "ui/events/keycodes/dom3/dom_key.h"
#include "ui/events/ozone/layout/keyboard_layout_engine_manager.h"
-#include "ui/events/ozone/layout/layout_util.h"
#include "ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h"
namespace ui {
@@ -72,8 +71,10 @@ class VkTestXkbKeyboardLayoutEngine : public XkbKeyboardLayoutEngine {
KeyboardCode key_code = DifficultKeyboardCode(
dom_code, flags, key_code_converter_.DomCodeToXkbKeyCode(dom_code),
flags, CharacterToKeySym(character), DomKey::CHARACTER, character);
- if (key_code == VKEY_UNKNOWN)
- key_code = DomCodeToNonLocatedKeyboardCode(dom_code);
+ if (key_code == VKEY_UNKNOWN) {
+ DomCode code = DomCodeToKeyboardCode(dom_code);
+ key_code = LocatedToNonLocatedKeyboardCode(code);
+ }
return key_code;
}
« no previous file with comments | « ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc ('k') | ui/events/test/event_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698