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

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

Issue 590913002: ChromeVox spoken feedback test using shift and search keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chromevox_keyboard_tests_again_3
Patch Set: Created 6 years, 3 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 c4b85ce30a83df2d4fbe581bf08d103f3e65db67..2cb7bfc43225002e274a3bc7bfcf102aee633a9d 100644
--- a/chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc
+++ b/chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc
@@ -313,6 +313,35 @@ IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, ChromeVoxPrefixKey) {
EXPECT_EQ("Enter a search query.", speech_monitor_.GetNextUtterance());
}
+IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, ChromeVoxNavigateAndSelect) {
+ LoadChromeVoxAndThenNavigateToURL(
+ GURL("data:text/html;charset=utf-8,"
+ "<h1>Title</h1>"
+ "<button autofocus>Click me</button>"));
+ while (true) {
+ std::string utterance = speech_monitor_.GetNextUtterance();
+ if (utterance == "Click me")
+ break;
+ }
+ EXPECT_EQ("Button", speech_monitor_.GetNextUtterance());
+
+ // Press Search+Shift+Up to navigate to the previous item.
+ SendKeyPressWithSearchAndShift(ui::VKEY_UP);
+ EXPECT_EQ("Title", speech_monitor_.GetNextUtterance());
+ EXPECT_EQ("Heading 1", speech_monitor_.GetNextUtterance());
+
+ // Press Search+Shift+S to select the text.
+ SendKeyPressWithSearchAndShift(ui::VKEY_S);
+ EXPECT_EQ("Start selection", speech_monitor_.GetNextUtterance());
+ EXPECT_EQ("Title", speech_monitor_.GetNextUtterance());
+ EXPECT_EQ(", selected", speech_monitor_.GetNextUtterance());
+
+ // Press again to end the selection.
+ SendKeyPressWithSearchAndShift(ui::VKEY_S);
+ EXPECT_EQ("End selection", speech_monitor_.GetNextUtterance());
+ EXPECT_EQ("Title", speech_monitor_.GetNextUtterance());
+}
+
IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, TouchExploreStatusTray) {
EXPECT_FALSE(AccessibilityManager::Get()->IsSpokenFeedbackEnabled());
« 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