| OLD | NEW |
| 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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray(); | 615 ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray(); |
| 616 tray->NotifyAccessibilityEvent(ui::AX_EVENT_HOVER, true); | 616 tray->NotifyAccessibilityEvent(ui::AX_EVENT_HOVER, true); |
| 617 | 617 |
| 618 EXPECT_EQ("Status tray,", speech_monitor_.GetNextUtterance()); | 618 EXPECT_EQ("Status tray,", speech_monitor_.GetNextUtterance()); |
| 619 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "time*,")); | 619 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "time*,")); |
| 620 EXPECT_TRUE( | 620 EXPECT_TRUE( |
| 621 base::MatchPattern(speech_monitor_.GetNextUtterance(), "Battery*")); | 621 base::MatchPattern(speech_monitor_.GetNextUtterance(), "Battery*")); |
| 622 EXPECT_EQ("Button", speech_monitor_.GetNextUtterance()); | 622 EXPECT_EQ("Button", speech_monitor_.GetNextUtterance()); |
| 623 } | 623 } |
| 624 | 624 |
| 625 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, ChromeVoxNextTabRecovery) { |
| 626 EnableChromeVox(); |
| 627 |
| 628 ui_test_utils::NavigateToURL(browser(), GURL("data:text/html;charset=utf-8," |
| 629 "<button autofocus>11</button>" |
| 630 "<button>22</button>" |
| 631 "<button>33</button>" |
| 632 "<h1>Middle</h1>" |
| 633 "<button>44</button>" |
| 634 "<button>55</button>")); |
| 635 while ("Button" != speech_monitor_.GetNextUtterance()) { |
| 636 } |
| 637 |
| 638 // Press Search+H to go to the next heading |
| 639 SendKeyPressWithSearch(ui::VKEY_H); |
| 640 while ("Middle" != speech_monitor_.GetNextUtterance()) { |
| 641 } |
| 642 |
| 643 SendKeyPress(ui::VKEY_TAB); |
| 644 while ("44" != speech_monitor_.GetNextUtterance()) { |
| 645 } |
| 646 } |
| 647 |
| 625 // | 648 // |
| 626 // Spoken feedback tests that run only in guest mode. | 649 // Spoken feedback tests that run only in guest mode. |
| 627 // | 650 // |
| 628 | 651 |
| 629 class GuestSpokenFeedbackTest : public LoggedInSpokenFeedbackTest { | 652 class GuestSpokenFeedbackTest : public LoggedInSpokenFeedbackTest { |
| 630 protected: | 653 protected: |
| 631 GuestSpokenFeedbackTest() {} | 654 GuestSpokenFeedbackTest() {} |
| 632 ~GuestSpokenFeedbackTest() override {} | 655 ~GuestSpokenFeedbackTest() override {} |
| 633 | 656 |
| 634 void SetUpCommandLine(base::CommandLine* command_line) override { | 657 void SetUpCommandLine(base::CommandLine* command_line) override { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync( | 728 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync( |
| 706 window, ui::VKEY_TAB, false, true /*shift*/, false, false)); | 729 window, ui::VKEY_TAB, false, true /*shift*/, false, false)); |
| 707 while (speech_monitor_.GetNextUtterance() != "Select your language:") { | 730 while (speech_monitor_.GetNextUtterance() != "Select your language:") { |
| 708 } | 731 } |
| 709 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance()); | 732 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance()); |
| 710 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), | 733 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), |
| 711 "Combo box * of *")); | 734 "Combo box * of *")); |
| 712 } | 735 } |
| 713 | 736 |
| 714 } // namespace chromeos | 737 } // namespace chromeos |
| OLD | NEW |