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

Unified Diff: ui/events/event_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/event.cc ('k') | ui/events/event_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event_unittest.cc
diff --git a/ui/events/event_unittest.cc b/ui/events/event_unittest.cc
index 7e92aa0a9696b32c490e4dbbd30e9f0b8be5659a..45b470b984418d76dfc11b30626bccf3aa7d256e 100644
--- a/ui/events/event_unittest.cc
+++ b/ui/events/event_unittest.cc
@@ -351,11 +351,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 based on the KeyboardCode using 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698