summaryrefslogtreecommitdiffstats
path: root/ash/accelerators
diff options
context:
space:
mode:
authoryukishiino@chromium.org <yukishiino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-22 17:52:45 +0000
committeryukishiino@chromium.org <yukishiino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-22 17:52:45 +0000
commit19d46db411a6caba696d77dc88f7bc3adf31032f (patch)
tree83c4065d0da9539bae1b2f892d7d9322010633f2 /ash/accelerators
parent2ec3b46c57e95a12d56277a9355801dcdd200788 (diff)
downloadchromium_src-19d46db411a6caba696d77dc88f7bc3adf31032f.zip
chromium_src-19d46db411a6caba696d77dc88f7bc3adf31032f.tar.gz
chromium_src-19d46db411a6caba696d77dc88f7bc3adf31032f.tar.bz2
Retires ui::TranslatedKeyEvent and replaces it with KeyEvent.
BUG=339355 TEST=Run unittests. TBR=jamesr@chromium.org, pfeldman@chromium.org Review URL: https://codereview.chromium.org/267723008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272228 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/accelerators')
-rw-r--r--ash/accelerators/accelerator_controller_unittest.cc18
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