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/accessibility_types.h" | 5 #include "ash/accessibility_types.h" |
6 #include "ash/login_status.h" | 6 #include "ash/login_status.h" |
7 #include "ash/magnifier/magnification_controller.h" | 7 #include "ash/magnifier/magnification_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/system/tray/system_tray.h" | 9 #include "ash/system/tray/system_tray.h" |
10 #include "ash/system/tray_accessibility.h" | 10 #include "ash/system/tray_accessibility.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 void SetUpCommandLine(base::CommandLine* command_line) override { | 81 void SetUpCommandLine(base::CommandLine* command_line) override { |
82 command_line->AppendSwitch(switches::kLoginManager); | 82 command_line->AppendSwitch(switches::kLoginManager); |
83 command_line->AppendSwitchASCII(switches::kLoginProfile, | 83 command_line->AppendSwitchASCII(switches::kLoginProfile, |
84 TestingProfile::kTestUserProfileDir); | 84 TestingProfile::kTestUserProfileDir); |
85 } | 85 } |
86 | 86 |
87 void SetUpOnMainThread() override { | 87 void SetUpOnMainThread() override { |
88 AccessibilityManager::Get()->SetProfileForTest(GetProfile()); | 88 AccessibilityManager::Get()->SetProfileForTest(GetProfile()); |
89 MagnificationManager::Get()->SetProfileForTest(GetProfile()); | 89 MagnificationManager::Get()->SetProfileForTest(GetProfile()); |
90 } | |
91 | |
92 void RunTestOnMainThreadLoop() override { | |
93 // Need to mark oobe completed to show detailed views. | 90 // Need to mark oobe completed to show detailed views. |
94 StartupUtils::MarkOobeCompleted(); | 91 StartupUtils::MarkOobeCompleted(); |
95 InProcessBrowserTest::RunTestOnMainThreadLoop(); | |
96 } | 92 } |
97 | 93 |
98 void TearDownOnMainThread() override { | 94 void TearDownOnMainThread() override { |
99 AccessibilityManager::SetBrailleControllerForTest(NULL); | 95 AccessibilityManager::SetBrailleControllerForTest(NULL); |
100 } | 96 } |
101 | 97 |
102 void SetShowAccessibilityOptionsInSystemTrayMenu(bool value) { | 98 void SetShowAccessibilityOptionsInSystemTrayMenu(bool value) { |
103 if (GetParam() == PREF_SERVICE) { | 99 if (GetParam() == PREF_SERVICE) { |
104 PrefService* prefs = GetProfile()->GetPrefs(); | 100 PrefService* prefs = GetProfile()->GetPrefs(); |
105 prefs->SetBoolean(prefs::kShouldAlwaysShowAccessibilityMenu, value); | 101 prefs->SetBoolean(prefs::kShouldAlwaysShowAccessibilityMenu, value); |
(...skipping 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1708 EXPECT_TRUE(IsTapDraggingMenuShownOnDetailMenu()); | 1704 EXPECT_TRUE(IsTapDraggingMenuShownOnDetailMenu()); |
1709 CloseDetailMenu(); | 1705 CloseDetailMenu(); |
1710 } | 1706 } |
1711 | 1707 |
1712 INSTANTIATE_TEST_CASE_P(TrayAccessibilityTestInstance, | 1708 INSTANTIATE_TEST_CASE_P(TrayAccessibilityTestInstance, |
1713 TrayAccessibilityTest, | 1709 TrayAccessibilityTest, |
1714 testing::Values(PREF_SERVICE, | 1710 testing::Values(PREF_SERVICE, |
1715 POLICY)); | 1711 POLICY)); |
1716 | 1712 |
1717 } // namespace chromeos | 1713 } // namespace chromeos |
OLD | NEW |