OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/magnifier/magnification_controller.h" | 5 #include "ash/magnifier/magnification_controller.h" |
6 #include "ash/shell.h" | 6 #include "ash/shell.h" |
7 #include "ash/system/tray/system_tray.h" | 7 #include "ash/system/tray/system_tray.h" |
8 #include "ash/system/tray/tray_views.h" | 8 #include "ash/system/tray/tray_views.h" |
9 #include "ash/system/tray_accessibility.h" | 9 #include "ash/system/tray_accessibility.h" |
10 #include "ash/system/user/login_status.h" | 10 #include "ash/system/user/login_status.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" |
13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
14 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" | 14 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" |
15 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 15 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
16 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" | 16 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h" |
17 #include "chrome/browser/chromeos/login/helper.h" | 17 #include "chrome/browser/chromeos/login/helper.h" |
18 #include "chrome/browser/chromeos/login/login_utils.h" | 18 #include "chrome/browser/chromeos/login/login_utils.h" |
| 19 #include "chrome/browser/chromeos/login/startup_utils.h" |
19 #include "chrome/browser/chromeos/login/user_manager.h" | 20 #include "chrome/browser/chromeos/login/user_manager.h" |
20 #include "chrome/browser/chromeos/login/user_manager_impl.h" | 21 #include "chrome/browser/chromeos/login/user_manager_impl.h" |
21 #include "chrome/browser/chromeos/login/wizard_controller.h" | |
22 #include "chrome/browser/profiles/profile.h" | 22 #include "chrome/browser/profiles/profile.h" |
23 #include "chrome/browser/profiles/profile_manager.h" | 23 #include "chrome/browser/profiles/profile_manager.h" |
24 #include "chrome/common/chrome_notification_types.h" | 24 #include "chrome/common/chrome_notification_types.h" |
25 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
26 #include "chrome/common/pref_names.h" | 26 #include "chrome/common/pref_names.h" |
27 #include "chrome/test/base/testing_profile.h" | 27 #include "chrome/test/base/testing_profile.h" |
28 #include "chromeos/chromeos_switches.h" | 28 #include "chromeos/chromeos_switches.h" |
29 #include "content/public/test/test_utils.h" | 29 #include "content/public/test/test_utils.h" |
30 #include "testing/gtest/include/gtest/gtest.h" | 30 #include "testing/gtest/include/gtest/gtest.h" |
31 #include "ui/views/widget/widget.h" | 31 #include "ui/views/widget/widget.h" |
(...skipping 10 matching lines...) Expand all Loading... |
42 virtual ~TrayAccessibilityTest() {} | 42 virtual ~TrayAccessibilityTest() {} |
43 | 43 |
44 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 44 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
45 command_line->AppendSwitch(switches::kLoginManager); | 45 command_line->AppendSwitch(switches::kLoginManager); |
46 command_line->AppendSwitchASCII(switches::kLoginProfile, | 46 command_line->AppendSwitchASCII(switches::kLoginProfile, |
47 TestingProfile::kTestUserProfileDir); | 47 TestingProfile::kTestUserProfileDir); |
48 } | 48 } |
49 | 49 |
50 virtual void RunTestOnMainThreadLoop() OVERRIDE { | 50 virtual void RunTestOnMainThreadLoop() OVERRIDE { |
51 // Need to mark oobe completed to show detailed views. | 51 // Need to mark oobe completed to show detailed views. |
52 WizardController::MarkOobeCompleted(); | 52 StartupUtils::MarkOobeCompleted(); |
53 CrosInProcessBrowserTest::RunTestOnMainThreadLoop(); | 53 CrosInProcessBrowserTest::RunTestOnMainThreadLoop(); |
54 } | 54 } |
55 | 55 |
56 ash::internal::TrayAccessibility* tray() { | 56 ash::internal::TrayAccessibility* tray() { |
57 return ash::Shell::GetInstance()->GetPrimarySystemTray()-> | 57 return ash::Shell::GetInstance()->GetPrimarySystemTray()-> |
58 GetTrayAccessibilityForTest(); | 58 GetTrayAccessibilityForTest(); |
59 } | 59 } |
60 | 60 |
61 bool IsTrayIconVisible() { | 61 bool IsTrayIconVisible() { |
62 return tray()->tray_icon_visible_; | 62 return tray()->tray_icon_visible_; |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 accessibility::EnableHighContrast(false); | 478 accessibility::EnableHighContrast(false); |
479 SetMagnifierEnabled(false); | 479 SetMagnifierEnabled(false); |
480 EXPECT_TRUE(CreateDetailedMenu()); | 480 EXPECT_TRUE(CreateDetailedMenu()); |
481 EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); | 481 EXPECT_FALSE(IsSpokenFeedbackEnabledOnDetailMenu()); |
482 EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); | 482 EXPECT_FALSE(IsHighContrastEnabledOnDetailMenu()); |
483 EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); | 483 EXPECT_FALSE(IsScreenMagnifierEnabledOnDetailMenu()); |
484 CloseDetailMenu(); | 484 CloseDetailMenu(); |
485 } | 485 } |
486 | 486 |
487 } // namespace chromeos | 487 } // namespace chromeos |
OLD | NEW |