summaryrefslogtreecommitdiffstats
path: root/ui/aura
diff options
context:
space:
mode:
authordmazzoni <dmazzoni@chromium.org>2014-09-22 15:36:16 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-22 22:36:31 +0000
commit15ea141544fedaf306c94890b5be19b7c5df885a (patch)
tree9ea2db1df846c984573f87b0123866b16a57ca6a /ui/aura
parent3c02f795c743e9cfbd4986d232836c8ab4f03997 (diff)
downloadchromium_src-15ea141544fedaf306c94890b5be19b7c5df885a.zip
chromium_src-15ea141544fedaf306c94890b5be19b7c5df885a.tar.gz
chromium_src-15ea141544fedaf306c94890b5be19b7c5df885a.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 Committed: https://crrev.com/91703961c10dfa0f452999ed7cb87945ea817362 Cr-Commit-Position: refs/heads/master@{#293687} Review URL: https://codereview.chromium.org/490443002 Cr-Commit-Position: refs/heads/master@{#296074}
Diffstat (limited to 'ui/aura')
-rw-r--r--ui/aura/test/ui_controls_factory_ozone.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/ui/aura/test/ui_controls_factory_ozone.cc b/ui/aura/test/ui_controls_factory_ozone.cc
index 5179360..4c5330c 100644
--- a/ui/aura/test/ui_controls_factory_ozone.cc
+++ b/ui/aura/test/ui_controls_factory_ozone.cc
@@ -36,8 +36,6 @@ class UIControlsOzone : public ui_controls::UIControlsAura {
bool alt,
bool command,
const base::Closure& closure) OVERRIDE {
- DCHECK(!command); // No command key on Aura
-
int flags = button_down_mask_;
if (control) {
@@ -55,6 +53,11 @@ class UIControlsOzone : public ui_controls::UIControlsAura {
PostKeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_MENU, flags);
}
+ if (command) {
+ flags |= ui::EF_COMMAND_DOWN;
+ PostKeyEvent(ui::ET_KEY_PRESSED, ui::VKEY_LWIN, flags);
+ }
+
PostKeyEvent(ui::ET_KEY_PRESSED, key, flags);
PostKeyEvent(ui::ET_KEY_RELEASED, key, flags);
@@ -73,6 +76,11 @@ class UIControlsOzone : public ui_controls::UIControlsAura {
PostKeyEvent(ui::ET_KEY_RELEASED, ui::VKEY_CONTROL, flags);
}
+ if (command) {
+ flags &= ~ui::EF_COMMAND_DOWN;
+ PostKeyEvent(ui::ET_KEY_RELEASED, ui::VKEY_LWIN, flags);
+ }
+
RunClosureAfterAllPendingUIEvents(closure);
return true;
}