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

Unified Diff: ui/wm/core/compound_event_filter_unittest.cc

Issue 404203003: Distinguish between keystroke and character events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IsCharFromNative() for Mac build Created 6 years, 5 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/views/window/dialog_delegate_unittest.cc ('k') | ui/wm/core/input_method_event_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/core/compound_event_filter_unittest.cc
diff --git a/ui/wm/core/compound_event_filter_unittest.cc b/ui/wm/core/compound_event_filter_unittest.cc
index afd3bcb5bd8870a9bf6fca18abdb8f938de4d4b6..0ecea95be602255ff8537d344c5f2d91a6d24cfd 100644
--- a/ui/wm/core/compound_event_filter_unittest.cc
+++ b/ui/wm/core/compound_event_filter_unittest.cc
@@ -64,7 +64,7 @@ TEST_F(CompoundEventFilterTest, CursorVisibilityChange) {
aura::test::TestCursorClient cursor_client(root_window());
// Send key event to hide the cursor.
- ui::KeyEvent key(ui::ET_KEY_PRESSED, ui::VKEY_A, 0, true);
+ ui::KeyEvent key('a', ui::VKEY_A, ui::EF_NONE);
DispatchEventUsingWindowDispatcher(&key);
EXPECT_FALSE(cursor_client.IsCursorVisible());
@@ -89,13 +89,13 @@ TEST_F(CompoundEventFilterTest, CursorVisibilityChange) {
// Disallow hiding the cursor on keypress.
cursor_client.set_should_hide_cursor_on_key_event(false);
- key = ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_A, 0, true);
+ key = ui::KeyEvent('a', ui::VKEY_A, ui::EF_NONE);
DispatchEventUsingWindowDispatcher(&key);
EXPECT_TRUE(cursor_client.IsCursorVisible());
// Allow hiding the cursor on keypress.
cursor_client.set_should_hide_cursor_on_key_event(true);
- key = ui::KeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_A, 0, true);
+ key = ui::KeyEvent('a', ui::VKEY_A, ui::EF_NONE);
DispatchEventUsingWindowDispatcher(&key);
EXPECT_FALSE(cursor_client.IsCursorVisible());
« no previous file with comments | « ui/views/window/dialog_delegate_unittest.cc ('k') | ui/wm/core/input_method_event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698