summaryrefslogtreecommitdiffstats
path: root/ui/aura
diff options
context:
space:
mode:
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;
}