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

Unified Diff: ui/views/widget/root_view_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/widget/desktop_aura/desktop_window_tree_host_x11.cc ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/root_view_unittest.cc
diff --git a/ui/views/widget/root_view_unittest.cc b/ui/views/widget/root_view_unittest.cc
index 049d765793bcbde0f995a99ee0b1936b2f4f2627..376fa6da4f385fc0311ae273963f54a59980b297 100644
--- a/ui/views/widget/root_view_unittest.cc
+++ b/ui/views/widget/root_view_unittest.cc
@@ -58,7 +58,7 @@ TEST_F(RootViewTest, DeleteViewDuringKeyEventDispatch) {
ViewTargeter* view_targeter = new ViewTargeter(root_view);
root_view->SetEventTargeter(make_scoped_ptr(view_targeter));
- ui::KeyEvent key_event(ui::ET_KEY_PRESSED, ui::VKEY_ESCAPE, 0, false);
+ ui::KeyEvent key_event(ui::ET_KEY_PRESSED, ui::VKEY_ESCAPE, ui::EF_NONE);
ui::EventDispatchDetails details = root_view->OnEventFromSource(&key_event);
EXPECT_TRUE(details.target_destroyed);
EXPECT_FALSE(details.dispatcher_destroyed);
@@ -122,7 +122,7 @@ TEST_F(RootViewTest, ContextMenuFromKeyEvent) {
focused_view->RequestFocus();
// No context menu should be shown for a keypress of 'A'.
- ui::KeyEvent nomenu_key_event(ui::ET_KEY_PRESSED, ui::VKEY_A, 0, true);
+ ui::KeyEvent nomenu_key_event('a', ui::VKEY_A, ui::EF_NONE);
ui::EventDispatchDetails details =
root_view->OnEventFromSource(&nomenu_key_event);
EXPECT_FALSE(details.target_destroyed);
@@ -134,7 +134,7 @@ TEST_F(RootViewTest, ContextMenuFromKeyEvent) {
// A context menu should be shown for a keypress of Shift+F10.
ui::KeyEvent menu_key_event(
- ui::ET_KEY_PRESSED, ui::VKEY_F10, ui::EF_SHIFT_DOWN, false);
+ ui::ET_KEY_PRESSED, ui::VKEY_F10, ui::EF_SHIFT_DOWN);
details = root_view->OnEventFromSource(&menu_key_event);
EXPECT_FALSE(details.target_destroyed);
EXPECT_FALSE(details.dispatcher_destroyed);
@@ -144,7 +144,7 @@ TEST_F(RootViewTest, ContextMenuFromKeyEvent) {
controller.Reset();
// A context menu should be shown for a keypress of VKEY_APPS.
- ui::KeyEvent menu_key_event2(ui::ET_KEY_PRESSED, ui::VKEY_APPS, 0, false);
+ ui::KeyEvent menu_key_event2(ui::ET_KEY_PRESSED, ui::VKEY_APPS, ui::EF_NONE);
details = root_view->OnEventFromSource(&menu_key_event2);
EXPECT_FALSE(details.target_destroyed);
EXPECT_FALSE(details.dispatcher_destroyed);
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698