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

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

Issue 2162083004: Make ToggleImageButton into an accessible toggle button. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rework toggle logic. Created 4 years, 5 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 | ui/views/controls/button/image_button.cc » ('j') | ui/views/controls/button/image_button.cc » ('J')
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 329f0179568f898772f8f66dde493d099406cb1b..811ee558e0dc166866bdbfeb09d111450a8746f2 100644
--- a/chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc
+++ b/chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc
@@ -227,6 +227,39 @@ IN_PROC_BROWSER_TEST_F(LoggedInSpokenFeedbackTest, DISABLED_AddBookmark) {
EXPECT_EQ("button", speech_monitor_.GetNextUtterance());
}
+IN_PROC_BROWSER_TEST_F(LoggedInSpokenFeedbackTest, NavigateNotificationCenter) {
dmazzoni 2016/07/22 18:06:29 wrap
David Tseng 2016/07/22 22:49:26 This is 80 characters.
+ EnableChromeVox();
+
+ EXPECT_TRUE(PerformAcceleratorAction(ash::SHOW_MESSAGE_CENTER_BUBBLE));
dmazzoni 2016/07/22 18:06:29 fix indentation
David Tseng 2016/07/22 22:49:26 Something strange is going on...this is a two char
+
+ // Wait for it to say "Notification Center, window".
+ while ("Notification Center, window" != speech_monitor_.GetNextUtterance()) {
+ }
+
+ // Tab until we get to the Do Not Disturb button.
+ SendKeyPress(ui::VKEY_TAB);
+ do {
+ std::string ut = speech_monitor_.GetNextUtterance();
+
+ if (ut == "Do not disturb")
+ break;
+ else if (ut == "Button")
+ SendKeyPress(ui::VKEY_TAB);
+ } while (true);
+ EXPECT_EQ("Button", speech_monitor_.GetNextUtterance());
+ EXPECT_EQ("Not pressed", speech_monitor_.GetNextUtterance());
+
+ SendKeyPress(ui::VKEY_SPACE);
+ EXPECT_EQ("Do not disturb", speech_monitor_.GetNextUtterance());
+ EXPECT_EQ("Button", speech_monitor_.GetNextUtterance());
+ EXPECT_EQ("Pressed", speech_monitor_.GetNextUtterance());
+
+ SendKeyPress(ui::VKEY_SPACE);
+ EXPECT_EQ("Do not disturb", speech_monitor_.GetNextUtterance());
+ EXPECT_EQ("Button", speech_monitor_.GetNextUtterance());
+ EXPECT_EQ("Not pressed", speech_monitor_.GetNextUtterance());
+}
+
//
// Spoken feedback tests in both a logged in browser window and guest mode.
//
« no previous file with comments | « no previous file | ui/views/controls/button/image_button.cc » ('j') | ui/views/controls/button/image_button.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698