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

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

Issue 687353004: Spoken Feedback Browsertests: ChromeOS UI tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove notifications test Created 6 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b5a3215873f12120bc6c7200a3e914ccbb2bf6ec..d664cc647e17c954e048d5e487293c9612680d78 100644
--- a/chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc
+++ b/chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc
@@ -297,10 +297,105 @@ IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, FocusShelf) {
EnableChromeVox();
EXPECT_TRUE(PerformAcceleratorAction(ash::FOCUS_SHELF));
-
EXPECT_EQ("Shelf,", speech_monitor_.GetNextUtterance());
EXPECT_EQ("Apps,", speech_monitor_.GetNextUtterance());
EXPECT_EQ("button", speech_monitor_.GetNextUtterance());
+
+ SendKeyPress(ui::VKEY_TAB);
+ EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "*, button"));
+}
+
+IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, NavigateAppLauncher) {
+ EnableChromeVox();
+
+ EXPECT_TRUE(PerformAcceleratorAction(ash::FOCUS_SHELF));
+ while (true) {
+ std::string utterance = speech_monitor_.GetNextUtterance();
+ if (utterance == "button")
+ break;
+ }
+
+ SendKeyPress(ui::VKEY_RETURN);
+ EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "Chrom*,"));
+ EXPECT_EQ("text box", speech_monitor_.GetNextUtterance());
+
+ SendKeyPress(ui::VKEY_DOWN);
+ EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "*, button"));
+}
+
+IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, OpenStatusTray) {
+ EnableChromeVox();
+
+ EXPECT_TRUE(PerformAcceleratorAction(ash::SHOW_SYSTEM_TRAY_BUBBLE));
+ EXPECT_EQ("Status tray,", speech_monitor_.GetNextUtterance());
+ EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "time *"));
+ EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(),
+ "Battery is*full."));
+ EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "*, button"));
+}
+
+IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, NavigateSystemTray) {
+ EnableChromeVox();
+
+ EXPECT_TRUE(PerformAcceleratorAction(ash::SHOW_SYSTEM_TRAY_BUBBLE));
+ while (true) {
+ std::string utterance = speech_monitor_.GetNextUtterance();
+ if (MatchPattern(utterance, "*, button"))
+ break;
+ }
+
+ // Navigate to Bluetooth sub-menu and open it.
+ while (true) {
+ SendKeyPress(ui::VKEY_TAB);
+ std::string utterance = speech_monitor_.GetNextUtterance();
+ if (MatchPattern(utterance, "*Bluetooth*, button"))
+ break;
+ }
+ SendKeyPress(ui::VKEY_RETURN);
+
+ // Navigate to return to previous menu button and press it.
+ while (true) {
+ SendKeyPress(ui::VKEY_TAB);
+ std::string utterance = speech_monitor_.GetNextUtterance();
+ if (MatchPattern(utterance, "Previous menu, button"))
+ break;
+ }
+ SendKeyPress(ui::VKEY_RETURN);
+ EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(),
+ "*Bluetooth*, button"));
+}
+
+IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, ScreenBrightness) {
+ EnableChromeVox();
+
+ EXPECT_TRUE(PerformAcceleratorAction(ash::BRIGHTNESS_UP));
+ EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(),
+ "Brightness * percent"));
+
+ EXPECT_TRUE(PerformAcceleratorAction(ash::BRIGHTNESS_DOWN));
+ EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(),
+ "Brightness * percent"));
+}
+
+IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, VolumeSlider) {
+ EnableChromeVox();
+
+ EXPECT_TRUE(PerformAcceleratorAction(ash::VOLUME_UP));
+ EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "*%,"));
+ EXPECT_EQ("Volume,", speech_monitor_.GetNextUtterance());
+ EXPECT_EQ("slider", speech_monitor_.GetNextUtterance());
+}
+
+IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, OverviewMode) {
+ EnableChromeVox();
+
+ EXPECT_TRUE(PerformAcceleratorAction(ash::TOGGLE_OVERVIEW));
+ EXPECT_EQ("Alert Entered window overview mode",
+ speech_monitor_.GetNextUtterance());
+ EXPECT_EQ(", text box", speech_monitor_.GetNextUtterance());
+
+ SendKeyPress(ui::VKEY_TAB);
+ EXPECT_EQ("about blank, button", speech_monitor_.GetNextUtterance());
}
IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, ChromeVoxShiftSearch) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698