| 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/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/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/system/tray/system_tray.h" | 10 #include "ash/system/tray/system_tray.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/strings/pattern.h" | 13 #include "base/strings/pattern.h" |
| 14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
| 15 #include "chrome/app/chrome_command_ids.h" | 15 #include "chrome/app/chrome_command_ids.h" |
| 16 #include "chrome/browser/chrome_notification_types.h" | 16 #include "chrome/browser/chrome_notification_types.h" |
| 17 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 17 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
| 18 #include "chrome/browser/chromeos/accessibility/speech_monitor.h" | 18 #include "chrome/browser/chromeos/accessibility/speech_monitor.h" |
| 19 #include "chrome/browser/chromeos/login/login_manager_test.h" | 19 #include "chrome/browser/chromeos/login/login_manager_test.h" |
| 20 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 20 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
| 21 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | |
| 22 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" | 21 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" |
| 23 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 22 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 24 #include "chrome/browser/extensions/api/braille_display_private/stub_braille_con
troller.h" | 23 #include "chrome/browser/extensions/api/braille_display_private/stub_braille_con
troller.h" |
| 25 #include "chrome/browser/speech/tts_controller.h" | 24 #include "chrome/browser/speech/tts_controller.h" |
| 26 #include "chrome/browser/speech/tts_platform.h" | 25 #include "chrome/browser/speech/tts_platform.h" |
| 27 #include "chrome/browser/ui/browser.h" | 26 #include "chrome/browser/ui/browser.h" |
| 28 #include "chrome/browser/ui/browser_commands.h" | 27 #include "chrome/browser/ui/browser_commands.h" |
| 29 #include "chrome/browser/ui/browser_window.h" | 28 #include "chrome/browser/ui/browser_window.h" |
| 30 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 29 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 31 #include "chrome/common/chrome_switches.h" | 30 #include "chrome/common/chrome_switches.h" |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 | 663 |
| 665 private: | 664 private: |
| 666 DISALLOW_COPY_AND_ASSIGN(OobeSpokenFeedbackTest); | 665 DISALLOW_COPY_AND_ASSIGN(OobeSpokenFeedbackTest); |
| 667 }; | 666 }; |
| 668 | 667 |
| 669 // Test is flaky: http://crbug.com/346797 | 668 // Test is flaky: http://crbug.com/346797 |
| 670 IN_PROC_BROWSER_TEST_F(OobeSpokenFeedbackTest, DISABLED_SpokenFeedbackInOobe) { | 669 IN_PROC_BROWSER_TEST_F(OobeSpokenFeedbackTest, DISABLED_SpokenFeedbackInOobe) { |
| 671 ui_controls::EnableUIControls(); | 670 ui_controls::EnableUIControls(); |
| 672 ASSERT_FALSE(AccessibilityManager::Get()->IsSpokenFeedbackEnabled()); | 671 ASSERT_FALSE(AccessibilityManager::Get()->IsSpokenFeedbackEnabled()); |
| 673 | 672 |
| 674 LoginDisplayHost* login_display_host = LoginDisplayHostImpl::default_host(); | 673 LoginDisplayHost* login_display_host = LoginDisplayHost::default_host(); |
| 675 WebUILoginView* web_ui_login_view = login_display_host->GetWebUILoginView(); | 674 WebUILoginView* web_ui_login_view = login_display_host->GetWebUILoginView(); |
| 676 views::Widget* widget = web_ui_login_view->GetWidget(); | 675 views::Widget* widget = web_ui_login_view->GetWidget(); |
| 677 gfx::NativeWindow window = widget->GetNativeWindow(); | 676 gfx::NativeWindow window = widget->GetNativeWindow(); |
| 678 | 677 |
| 679 // We expect to be in the language select dropdown for this test to work, | 678 // We expect to be in the language select dropdown for this test to work, |
| 680 // so make sure that's the case. | 679 // so make sure that's the case. |
| 681 js_checker().ExecuteAsync("$('language-select').focus()"); | 680 js_checker().ExecuteAsync("$('language-select').focus()"); |
| 682 AccessibilityManager::Get()->EnableSpokenFeedback( | 681 AccessibilityManager::Get()->EnableSpokenFeedback( |
| 683 true, ui::A11Y_NOTIFICATION_NONE); | 682 true, ui::A11Y_NOTIFICATION_NONE); |
| 684 ASSERT_TRUE(speech_monitor_.SkipChromeVoxEnabledMessage()); | 683 ASSERT_TRUE(speech_monitor_.SkipChromeVoxEnabledMessage()); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 697 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync( | 696 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync( |
| 698 window, ui::VKEY_TAB, false, true /*shift*/, false, false)); | 697 window, ui::VKEY_TAB, false, true /*shift*/, false, false)); |
| 699 while (speech_monitor_.GetNextUtterance() != "Select your language:") { | 698 while (speech_monitor_.GetNextUtterance() != "Select your language:") { |
| 700 } | 699 } |
| 701 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance()); | 700 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance()); |
| 702 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), | 701 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), |
| 703 "Combo box * of *")); | 702 "Combo box * of *")); |
| 704 } | 703 } |
| 705 | 704 |
| 706 } // namespace chromeos | 705 } // namespace chromeos |
| OLD | NEW |