summaryrefslogtreecommitdiffstats
path: root/ash/accelerators/nested_dispatcher_controller_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ash/accelerators/nested_dispatcher_controller_unittest.cc')
-rw-r--r--ash/accelerators/nested_dispatcher_controller_unittest.cc16
1 files changed, 5 insertions, 11 deletions
diff --git a/ash/accelerators/nested_dispatcher_controller_unittest.cc b/ash/accelerators/nested_dispatcher_controller_unittest.cc
index 56440ee..445c29c 100644
--- a/ash/accelerators/nested_dispatcher_controller_unittest.cc
+++ b/ash/accelerators/nested_dispatcher_controller_unittest.cc
@@ -84,19 +84,13 @@ void DispatchKeyReleaseA() {
MSG native_event_up = { NULL, WM_KEYUP, ui::VKEY_A, 0 };
ash::Shell::GetPrimaryRootWindow()->host()->PostNativeEvent(native_event_up);
#elif defined(USE_X11)
- XEvent native_event;
- ui::InitXKeyEventForTesting(ui::ET_KEY_PRESSED,
- ui::VKEY_A,
- 0,
- &native_event);
+ ui::ScopedXI2Event native_event;
+ native_event.InitKeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_A, 0);
aura::WindowEventDispatcher* dispatcher =
ash::Shell::GetPrimaryRootWindow()->GetDispatcher();
- dispatcher->host()->PostNativeEvent(&native_event);
- ui::InitXKeyEventForTesting(ui::ET_KEY_RELEASED,
- ui::VKEY_A,
- 0,
- &native_event);
- dispatcher->host()->PostNativeEvent(&native_event);
+ dispatcher->host()->PostNativeEvent(native_event);
+ native_event.InitKeyEvent(ui::ET_KEY_RELEASED, ui::VKEY_A, 0);
+ dispatcher->host()->PostNativeEvent(native_event);
#endif
// Send noop event to signal dispatcher to exit.