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

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

Issue 2281983002: No initial focusing of buttons in the message center bubble (Closed)
Patch Set: Fix test Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/message_center/views/message_center_bubble.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/common/accelerators/accelerator_controller.h" 7 #include "ash/common/accelerators/accelerator_controller.h"
8 #include "ash/common/accelerators/accelerator_table.h" 8 #include "ash/common/accelerators/accelerator_table.h"
9 #include "ash/common/accessibility_types.h" 9 #include "ash/common/accessibility_types.h"
10 #include "ash/common/system/tray/system_tray.h" 10 #include "ash/common/system/tray/system_tray.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 226 }
227 EXPECT_EQ("foo,", speech_monitor_.GetNextUtterance()); 227 EXPECT_EQ("foo,", speech_monitor_.GetNextUtterance());
228 EXPECT_EQ("button", speech_monitor_.GetNextUtterance()); 228 EXPECT_EQ("button", speech_monitor_.GetNextUtterance());
229 } 229 }
230 230
231 IN_PROC_BROWSER_TEST_F(LoggedInSpokenFeedbackTest, NavigateNotificationCenter) { 231 IN_PROC_BROWSER_TEST_F(LoggedInSpokenFeedbackTest, NavigateNotificationCenter) {
232 EnableChromeVox(); 232 EnableChromeVox();
233 233
234 EXPECT_TRUE(PerformAcceleratorAction(ash::SHOW_MESSAGE_CENTER_BUBBLE)); 234 EXPECT_TRUE(PerformAcceleratorAction(ash::SHOW_MESSAGE_CENTER_BUBBLE));
235 235
236 // Tab to request the initial focus.
237 SendKeyPress(ui::VKEY_TAB);
238
236 // Wait for it to say "Notification Center, window". 239 // Wait for it to say "Notification Center, window".
237 while ("Notification Center, window" != speech_monitor_.GetNextUtterance()) { 240 while ("Notification Center, window" != speech_monitor_.GetNextUtterance()) {
238 } 241 }
239 242
240 // Tab until we get to the Do Not Disturb button. 243 // Tab until we get to the Do Not Disturb button.
241 SendKeyPress(ui::VKEY_TAB); 244 SendKeyPress(ui::VKEY_TAB);
242 do { 245 do {
243 std::string ut = speech_monitor_.GetNextUtterance(); 246 std::string ut = speech_monitor_.GetNextUtterance();
244 247
245 if (ut == "Do not disturb") 248 if (ut == "Do not disturb")
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync( 793 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync(
791 window, ui::VKEY_TAB, false, true /*shift*/, false, false)); 794 window, ui::VKEY_TAB, false, true /*shift*/, false, false));
792 while (speech_monitor_.GetNextUtterance() != "Select your language:") { 795 while (speech_monitor_.GetNextUtterance() != "Select your language:") {
793 } 796 }
794 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance()); 797 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance());
795 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), 798 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(),
796 "Combo box * of *")); 799 "Combo box * of *"));
797 } 800 }
798 801
799 } // namespace chromeos 802 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | ui/message_center/views/message_center_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698