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

Side by Side 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: Add test. 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/views/controls/button/image_button.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/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/accelerators/accelerator_table.h" 8 #include "ash/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 649 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray(); 660 ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray();
661 tray->NotifyAccessibilityEvent(ui::AX_EVENT_HOVER, true); 661 tray->NotifyAccessibilityEvent(ui::AX_EVENT_HOVER, true);
662 662
663 EXPECT_EQ("Status tray,", speech_monitor_.GetNextUtterance()); 663 EXPECT_EQ("Status tray,", speech_monitor_.GetNextUtterance());
664 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "time*,")); 664 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "time*,"));
665 EXPECT_TRUE( 665 EXPECT_TRUE(
666 base::MatchPattern(speech_monitor_.GetNextUtterance(), "Battery*")); 666 base::MatchPattern(speech_monitor_.GetNextUtterance(), "Battery*"));
667 EXPECT_EQ("Button", speech_monitor_.GetNextUtterance()); 667 EXPECT_EQ("Button", speech_monitor_.GetNextUtterance());
668 } 668 }
669 669
670 IN_PROC_BROWSER_TEST_F(LoggedInSpokenFeedbackTest, NavigateNotificationCenter) {
671 EnableChromeVox();
672
673 EXPECT_TRUE(PerformAcceleratorAction(ash::SHOW_MESSAGE_CENTER_BUBBLE));
674
675 // Wait for it to say "Notification Center, window".
676 while ("Notification Center, window" != speech_monitor_.GetNextUtterance()) {
677 }
678
679 // Tab until we get to the Do Not Disturb button.
680 SendKeyPress(ui::VKEY_TAB);
681 do {
dmazzoni 2016/07/21 17:05:57 This looks incomplete?
682 std::string ut = speech_monitor_.GetNextUtterance();
683
684 }
685
670 // 686 //
671 // Spoken feedback tests that run only in guest mode. 687 // Spoken feedback tests that run only in guest mode.
672 // 688 //
673 689
674 class GuestSpokenFeedbackTest : public LoggedInSpokenFeedbackTest { 690 class GuestSpokenFeedbackTest : public LoggedInSpokenFeedbackTest {
675 protected: 691 protected:
676 GuestSpokenFeedbackTest() {} 692 GuestSpokenFeedbackTest() {}
677 ~GuestSpokenFeedbackTest() override {} 693 ~GuestSpokenFeedbackTest() override {}
678 694
679 void SetUpCommandLine(base::CommandLine* command_line) override { 695 void SetUpCommandLine(base::CommandLine* command_line) override {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync( 770 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync(
755 window, ui::VKEY_TAB, false, true /*shift*/, false, false)); 771 window, ui::VKEY_TAB, false, true /*shift*/, false, false));
756 while (speech_monitor_.GetNextUtterance() != "Select your language:") { 772 while (speech_monitor_.GetNextUtterance() != "Select your language:") {
757 } 773 }
758 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance()); 774 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance());
759 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), 775 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(),
760 "Combo box * of *")); 776 "Combo box * of *"));
761 } 777 }
762 778
763 } // namespace chromeos 779 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | ui/views/controls/button/image_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698