diff options
Diffstat (limited to 'ash/accelerators/accelerator_controller_unittest.cc')
-rw-r--r-- | ash/accelerators/accelerator_controller_unittest.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc index 23d42d9..738c9d3 100644 --- a/ash/accelerators/accelerator_controller_unittest.cc +++ b/ash/accelerators/accelerator_controller_unittest.cc @@ -591,32 +591,38 @@ TEST_F(AcceleratorControllerTest, MAYBE_ProcessOnce) { Shell::GetPrimaryRootWindow()->GetHost()->event_processor(); #if defined(OS_WIN) MSG msg1 = { NULL, WM_KEYDOWN, ui::VKEY_A, 0 }; - ui::TranslatedKeyEvent key_event1(msg1, false); + ui::KeyEvent key_event1(msg1, false); + key_event1.SetTranslated(true); ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&key_event1); EXPECT_TRUE(key_event1.handled() || details.dispatcher_destroyed); MSG msg2 = { NULL, WM_CHAR, L'A', 0 }; - ui::TranslatedKeyEvent key_event2(msg2, true); + ui::KeyEvent key_event2(msg2, true); + key_event2.SetTranslated(true); details = dispatcher->OnEventFromSource(&key_event2); EXPECT_FALSE(key_event2.handled() || details.dispatcher_destroyed); MSG msg3 = { NULL, WM_KEYUP, ui::VKEY_A, 0 }; - ui::TranslatedKeyEvent key_event3(msg3, false); + ui::KeyEvent key_event3(msg3, false); + key_event3.SetTranslated(true); details = dispatcher->OnEventFromSource(&key_event3); EXPECT_FALSE(key_event3.handled() || details.dispatcher_destroyed); #elif defined(USE_X11) ui::ScopedXI2Event key_event; key_event.InitKeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_A, 0); - ui::TranslatedKeyEvent key_event1(key_event, false); + ui::KeyEvent key_event1(key_event, false); + key_event1.SetTranslated(true); ui::EventDispatchDetails details = dispatcher->OnEventFromSource(&key_event1); EXPECT_TRUE(key_event1.handled() || details.dispatcher_destroyed); - ui::TranslatedKeyEvent key_event2(key_event, true); + ui::KeyEvent key_event2(key_event, true); + key_event2.SetTranslated(true); details = dispatcher->OnEventFromSource(&key_event2); EXPECT_FALSE(key_event2.handled() || details.dispatcher_destroyed); key_event.InitKeyEvent(ui::ET_KEY_RELEASED, ui::VKEY_A, 0); - ui::TranslatedKeyEvent key_event3(key_event, false); + ui::KeyEvent key_event3(key_event, false); + key_event3.SetTranslated(true); details = dispatcher->OnEventFromSource(&key_event3); EXPECT_FALSE(key_event3.handled() || details.dispatcher_destroyed); #endif |