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

Unified Diff: chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc

Issue 1696443002: Re-land: Implement ChromeVox Next menus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc
diff --git a/chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc b/chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc
index 08e50c085b38a9204c6f466a915c849d8fc09991..939e476c6f91c5e89493d9ca07925d2dcb6cd397 100644
--- a/chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc
+++ b/chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc
@@ -320,17 +320,46 @@ IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, NavigateAppLauncher) {
EnableChromeVox();
EXPECT_TRUE(PerformAcceleratorAction(ash::FOCUS_SHELF));
+
+ // Wait for it to say "Launcher", "Button".
while (true) {
std::string utterance = speech_monitor_.GetNextUtterance();
if (base::MatchPattern(utterance, "Button"))
break;
}
+ // Click on the launcher, it brings up the app list UI.
SendKeyPress(ui::VKEY_RETURN);
-
EXPECT_EQ("Search or type URL", speech_monitor_.GetNextUtterance());
EXPECT_EQ("Edit text", speech_monitor_.GetNextUtterance());
+ // Close it and open it again.
+ SendKeyPress(ui::VKEY_ESCAPE);
+ while (true) {
+ std::string utterance = speech_monitor_.GetNextUtterance();
+ if (base::MatchPattern(utterance, "*window*"))
+ break;
+ }
+
+ EXPECT_TRUE(PerformAcceleratorAction(ash::FOCUS_SHELF));
+ while (true) {
+ std::string utterance = speech_monitor_.GetNextUtterance();
+ if (base::MatchPattern(utterance, "Button"))
+ break;
+ }
+ SendKeyPress(ui::VKEY_RETURN);
+
+ // Now type a space into the text field and wait until we hear "space".
+ // This makes the test more robust as it allows us to skip over other
+ // speech along the way.
+ SendKeyPress(ui::VKEY_SPACE);
+ while (true) {
+ if ("space" == speech_monitor_.GetNextUtterance())
+ break;
+ }
+
+ // Now press the down arrow and we should be focused on an app button
+ // in a dialog.
SendKeyPress(ui::VKEY_DOWN);
EXPECT_EQ("Dialog", speech_monitor_.GetNextUtterance());
EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "*"));
« no previous file with comments | « chrome/browser/chromeos/accessibility/chromevox_panel.cc ('k') | chrome/browser/resources/chromeos/chromevox/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698