| 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 18 matching lines...) Expand all Loading... |
| 29 #include "chrome/browser/ui/browser_commands.h" | 29 #include "chrome/browser/ui/browser_commands.h" |
| 30 #include "chrome/browser/ui/browser_window.h" | 30 #include "chrome/browser/ui/browser_window.h" |
| 31 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 31 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 32 #include "chrome/common/chrome_switches.h" | 32 #include "chrome/common/chrome_switches.h" |
| 33 #include "chrome/common/extensions/extension_constants.h" | 33 #include "chrome/common/extensions/extension_constants.h" |
| 34 #include "chrome/test/base/in_process_browser_test.h" | 34 #include "chrome/test/base/in_process_browser_test.h" |
| 35 #include "chrome/test/base/interactive_test_utils.h" | 35 #include "chrome/test/base/interactive_test_utils.h" |
| 36 #include "chrome/test/base/testing_profile.h" | 36 #include "chrome/test/base/testing_profile.h" |
| 37 #include "chrome/test/base/ui_test_utils.h" | 37 #include "chrome/test/base/ui_test_utils.h" |
| 38 #include "chromeos/chromeos_switches.h" | 38 #include "chromeos/chromeos_switches.h" |
| 39 #include "chromeos/login/user_names.h" | |
| 40 #include "components/signin/core/account_id/account_id.h" | 39 #include "components/signin/core/account_id/account_id.h" |
| 40 #include "components/user_manager/user_names.h" |
| 41 #include "content/public/browser/browser_thread.h" | 41 #include "content/public/browser/browser_thread.h" |
| 42 #include "content/public/common/url_constants.h" | 42 #include "content/public/common/url_constants.h" |
| 43 #include "content/public/test/browser_test_utils.h" | 43 #include "content/public/test/browser_test_utils.h" |
| 44 #include "content/public/test/test_utils.h" | 44 #include "content/public/test/test_utils.h" |
| 45 #include "extensions/browser/extension_host.h" | 45 #include "extensions/browser/extension_host.h" |
| 46 #include "extensions/browser/process_manager.h" | 46 #include "extensions/browser/process_manager.h" |
| 47 #include "testing/gtest/include/gtest/gtest.h" | 47 #include "testing/gtest/include/gtest/gtest.h" |
| 48 #include "ui/app_list/app_list_switches.h" | 48 #include "ui/app_list/app_list_switches.h" |
| 49 #include "ui/base/test/ui_controls.h" | 49 #include "ui/base/test/ui_controls.h" |
| 50 #include "ui/compositor/scoped_animation_duration_scale_mode.h" | 50 #include "ui/compositor/scoped_animation_duration_scale_mode.h" |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 protected: | 256 protected: |
| 257 SpokenFeedbackTest() {} | 257 SpokenFeedbackTest() {} |
| 258 virtual ~SpokenFeedbackTest() {} | 258 virtual ~SpokenFeedbackTest() {} |
| 259 | 259 |
| 260 void SetUpCommandLine(base::CommandLine* command_line) override { | 260 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 261 if (GetParam() == kTestAsGuestUser) { | 261 if (GetParam() == kTestAsGuestUser) { |
| 262 command_line->AppendSwitch(chromeos::switches::kGuestSession); | 262 command_line->AppendSwitch(chromeos::switches::kGuestSession); |
| 263 command_line->AppendSwitch(::switches::kIncognito); | 263 command_line->AppendSwitch(::switches::kIncognito); |
| 264 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, | 264 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, |
| 265 "user"); | 265 "user"); |
| 266 command_line->AppendSwitchASCII(switches::kLoginUser, | 266 command_line->AppendSwitchASCII( |
| 267 login::GuestAccountId().GetUserEmail()); | 267 switches::kLoginUser, |
| 268 user_manager::chromeos::GuestAccountId().GetUserEmail()); |
| 268 } | 269 } |
| 269 } | 270 } |
| 270 }; | 271 }; |
| 271 | 272 |
| 272 INSTANTIATE_TEST_CASE_P( | 273 INSTANTIATE_TEST_CASE_P( |
| 273 TestAsNormalAndGuestUser, | 274 TestAsNormalAndGuestUser, |
| 274 SpokenFeedbackTest, | 275 SpokenFeedbackTest, |
| 275 ::testing::Values(kTestAsNormalUser, | 276 ::testing::Values(kTestAsNormalUser, |
| 276 kTestAsGuestUser)); | 277 kTestAsGuestUser)); |
| 277 | 278 |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 | 629 |
| 629 class GuestSpokenFeedbackTest : public LoggedInSpokenFeedbackTest { | 630 class GuestSpokenFeedbackTest : public LoggedInSpokenFeedbackTest { |
| 630 protected: | 631 protected: |
| 631 GuestSpokenFeedbackTest() {} | 632 GuestSpokenFeedbackTest() {} |
| 632 ~GuestSpokenFeedbackTest() override {} | 633 ~GuestSpokenFeedbackTest() override {} |
| 633 | 634 |
| 634 void SetUpCommandLine(base::CommandLine* command_line) override { | 635 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 635 command_line->AppendSwitch(chromeos::switches::kGuestSession); | 636 command_line->AppendSwitch(chromeos::switches::kGuestSession); |
| 636 command_line->AppendSwitch(::switches::kIncognito); | 637 command_line->AppendSwitch(::switches::kIncognito); |
| 637 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); | 638 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); |
| 638 command_line->AppendSwitchASCII(switches::kLoginUser, | 639 command_line->AppendSwitchASCII( |
| 639 login::GuestAccountId().GetUserEmail()); | 640 switches::kLoginUser, |
| 641 user_manager::chromeos::GuestAccountId().GetUserEmail()); |
| 640 } | 642 } |
| 641 | 643 |
| 642 private: | 644 private: |
| 643 DISALLOW_COPY_AND_ASSIGN(GuestSpokenFeedbackTest); | 645 DISALLOW_COPY_AND_ASSIGN(GuestSpokenFeedbackTest); |
| 644 }; | 646 }; |
| 645 | 647 |
| 646 IN_PROC_BROWSER_TEST_F(GuestSpokenFeedbackTest, FocusToolbar) { | 648 IN_PROC_BROWSER_TEST_F(GuestSpokenFeedbackTest, FocusToolbar) { |
| 647 EnableChromeVox(); | 649 EnableChromeVox(); |
| 648 | 650 |
| 649 chrome::ExecuteCommand(browser(), IDC_FOCUS_TOOLBAR); | 651 chrome::ExecuteCommand(browser(), IDC_FOCUS_TOOLBAR); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync( | 707 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync( |
| 706 window, ui::VKEY_TAB, false, true /*shift*/, false, false)); | 708 window, ui::VKEY_TAB, false, true /*shift*/, false, false)); |
| 707 while (speech_monitor_.GetNextUtterance() != "Select your language:") { | 709 while (speech_monitor_.GetNextUtterance() != "Select your language:") { |
| 708 } | 710 } |
| 709 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance()); | 711 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance()); |
| 710 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), | 712 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), |
| 711 "Combo box * of *")); | 713 "Combo box * of *")); |
| 712 } | 714 } |
| 713 | 715 |
| 714 } // namespace chromeos | 716 } // namespace chromeos |
| OLD | NEW |