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

Unified Diff: ui/events/event_unittest.cc

Issue 841263005: Use DOM- rather than Windows-based key code for non-layout cases. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments (sadrul) Created 5 years, 8 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
Index: ui/events/event_unittest.cc
diff --git a/ui/events/event_unittest.cc b/ui/events/event_unittest.cc
index 1297f3095b60f153b0fb08d9a5d8f01012e4c6f1..6d948121be5d22abac0ad06e0fb7b9936beed150 100644
--- a/ui/events/event_unittest.cc
+++ b/ui/events/event_unittest.cc
@@ -367,11 +367,10 @@ TEST(EventTest, KeyEventCode) {
EXPECT_EQ(kCodeForSpace, key.GetCodeString());
}
{
- // If the synthetic event is initialized without code, it returns
- // an empty string.
- // TODO(komatsu): Fill a fallback value assuming the US keyboard layout.
+ // If the synthetic event is initialized without code, the code is
+ // determined from the KeyboardCode assuming a US keyboard layout.
KeyEvent key(ET_KEY_PRESSED, VKEY_SPACE, EF_NONE);
- EXPECT_TRUE(key.GetCodeString().empty());
+ EXPECT_EQ(kCodeForSpace, key.GetCodeString());
}
#if defined(USE_X11)
{
« no previous file with comments | « ui/events/event.cc ('k') | ui/events/event_utils.h » ('j') | ui/keyboard/keyboard_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698