Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(653)

Side by Side Diff: chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc

Issue 729993002: Alphabetise AcceleratorController::PerformAction() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nested_dispatch0
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/accelerators/debug_commands.cc ('k') | chrome/browser/ui/views/accelerator_table.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <queue> 5 #include <queue>
6 6
7 #include "ash/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/accelerators/accelerator_table.h" 8 #include "ash/accelerators/accelerator_table.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/system/tray/system_tray.h" 10 #include "ash/system/tray/system_tray.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 92 }
93 93
94 void SimulateTouchScreenInChromeVox() { 94 void SimulateTouchScreenInChromeVox() {
95 // ChromeVox looks at whether 'ontouchstart' exists to know whether 95 // ChromeVox looks at whether 'ontouchstart' exists to know whether
96 // or not it should respond to hover events. Fake it so that touch 96 // or not it should respond to hover events. Fake it so that touch
97 // exploration events get spoken. 97 // exploration events get spoken.
98 RunJavaScriptInChromeVoxBackgroundPage( 98 RunJavaScriptInChromeVoxBackgroundPage(
99 "window.ontouchstart = function() {};"); 99 "window.ontouchstart = function() {};");
100 } 100 }
101 101
102 bool PerformAcceleratorAction(int action) { 102 bool PerformAcceleratorAction(ash::AcceleratorAction action) {
103 ash::AcceleratorController* controller = 103 ash::AcceleratorController* controller =
104 ash::Shell::GetInstance()->accelerator_controller(); 104 ash::Shell::GetInstance()->accelerator_controller();
105 return controller->PerformActionIfEnabled(action); 105 return controller->PerformActionIfEnabled(action);
106 } 106 }
107 107
108 void DisableEarcons() { 108 void DisableEarcons() {
109 // Playing earcons from within a test is not only annoying if you're 109 // Playing earcons from within a test is not only annoying if you're
110 // running the test locally, but seems to cause crashes 110 // running the test locally, but seems to cause crashes
111 // (http://crbug.com/396507). Work around this by just telling 111 // (http://crbug.com/396507). Work around this by just telling
112 // ChromeVox to not ever play earcons (prerecorded sound effects). 112 // ChromeVox to not ever play earcons (prerecorded sound effects).
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance()); 594 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance());
595 EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), 595 EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(),
596 "Combo box * of *")); 596 "Combo box * of *"));
597 ASSERT_TRUE( 597 ASSERT_TRUE(
598 ui_test_utils::SendKeyPressToWindowSync( 598 ui_test_utils::SendKeyPressToWindowSync(
599 window, ui::VKEY_TAB, false, false, false, false)); 599 window, ui::VKEY_TAB, false, false, false, false));
600 EXPECT_EQ("Select your keyboard:", speech_monitor_.GetNextUtterance()); 600 EXPECT_EQ("Select your keyboard:", speech_monitor_.GetNextUtterance());
601 } 601 }
602 602
603 } // namespace chromeos 603 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/accelerators/debug_commands.cc ('k') | chrome/browser/ui/views/accelerator_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698