diff options
author | dmazzoni <dmazzoni@chromium.org> | 2014-09-08 00:22:39 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-08 07:25:22 +0000 |
commit | 91703961c10dfa0f452999ed7cb87945ea817362 (patch) | |
tree | 384ef5a48fe29c5e7a9e375b6957374c04f5bf45 /ui/aura/test/ui_controls_factory_aurax11.cc | |
parent | 410d6b1f38af9f17048ec2b2458615e26580b77c (diff) | |
download | chromium_src-91703961c10dfa0f452999ed7cb87945ea817362.zip chromium_src-91703961c10dfa0f452999ed7cb87945ea817362.tar.gz chromium_src-91703961c10dfa0f452999ed7cb87945ea817362.tar.bz2 |
Add test for ChromeVox keyboard commands.
This is just a couple of quick sanity checks to prevent future regressions
like the one in the linked bug. It tests both a Search+Shift shortcut and
the corresponding Prefix Key shortcut.
Adds support for sending the meta modifier key in
aura/x11 tests.
BUG=404470
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=291547
Committed: https://chromium.googlesource.com/chromium/src/+/8cab2737f1cb6e6011b0946f6bef5027868602c0
Review URL: https://codereview.chromium.org/490443002
Cr-Commit-Position: refs/heads/master@{#293687}
Diffstat (limited to 'ui/aura/test/ui_controls_factory_aurax11.cc')
-rw-r--r-- | ui/aura/test/ui_controls_factory_aurax11.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/aura/test/ui_controls_factory_aurax11.cc b/ui/aura/test/ui_controls_factory_aurax11.cc index 06a9439..383d073 100644 --- a/ui/aura/test/ui_controls_factory_aurax11.cc +++ b/ui/aura/test/ui_controls_factory_aurax11.cc @@ -56,7 +56,6 @@ class UIControlsX11 : public UIControlsAura { bool shift, bool alt, bool command) OVERRIDE { - DCHECK(!command); // No command key on Aura return SendKeyPressNotifyWhenDone( window, key, control, shift, alt, command, base::Closure()); } @@ -68,7 +67,6 @@ class UIControlsX11 : public UIControlsAura { bool alt, bool command, const base::Closure& closure) OVERRIDE { - DCHECK(!command); // No command key on Aura XEvent xevent = {0}; xevent.xkey.type = KeyPress; if (control) @@ -77,6 +75,8 @@ class UIControlsX11 : public UIControlsAura { SetKeycodeAndSendThenMask(&xevent, XK_Shift_L, ShiftMask); if (alt) SetKeycodeAndSendThenMask(&xevent, XK_Alt_L, Mod1Mask); + if (command) + SetKeycodeAndSendThenMask(&xevent, XK_Super_L, Mod4Mask); xevent.xkey.keycode = XKeysymToKeycode(gfx::GetXDisplay(), ui::XKeysymForWindowsKeyCode(key, shift)); @@ -91,6 +91,8 @@ class UIControlsX11 : public UIControlsAura { UnmaskAndSetKeycodeThenSend(&xevent, ShiftMask, XK_Shift_L); if (control) UnmaskAndSetKeycodeThenSend(&xevent, ControlMask, XK_Control_L); + if (command) + UnmaskAndSetKeycodeThenSend(&xevent, Mod4Mask, XK_Super_L); DCHECK(!xevent.xkey.state); RunClosureAfterAllPendingUIEvents(closure); return true; |