OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/test/ash_test_helper.h" | 5 #include "ash/test/ash_test_helper.h" |
6 | 6 |
7 #include "ash/accelerators/accelerator_controller.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
8 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/test/display_manager_test_api.h" | 10 #include "ash/test/display_manager_test_api.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 Shell* shell = Shell::GetInstance(); | 91 Shell* shell = Shell::GetInstance(); |
92 if (start_session) { | 92 if (start_session) { |
93 test_shell_delegate_->test_session_state_delegate()-> | 93 test_shell_delegate_->test_session_state_delegate()-> |
94 SetActiveUserSessionStarted(true); | 94 SetActiveUserSessionStarted(true); |
95 test_shell_delegate_->test_session_state_delegate()-> | 95 test_shell_delegate_->test_session_state_delegate()-> |
96 SetHasActiveUser(true); | 96 SetHasActiveUser(true); |
97 } | 97 } |
98 | 98 |
99 test::DisplayManagerTestApi(shell->display_manager()). | 99 test::DisplayManagerTestApi(shell->display_manager()). |
100 DisableChangeDisplayUponHostResize(); | 100 DisableChangeDisplayUponHostResize(); |
101 ShellTestApi(shell).DisableOutputConfiguratorAnimation(); | 101 ShellTestApi(shell).DisableDisplayConfiguratorAnimation(); |
102 | 102 |
103 test_screenshot_delegate_ = new TestScreenshotDelegate(); | 103 test_screenshot_delegate_ = new TestScreenshotDelegate(); |
104 shell->accelerator_controller()->SetScreenshotDelegate( | 104 shell->accelerator_controller()->SetScreenshotDelegate( |
105 scoped_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); | 105 scoped_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); |
106 } | 106 } |
107 | 107 |
108 void AshTestHelper::TearDown() { | 108 void AshTestHelper::TearDown() { |
109 // Tear down the shell. | 109 // Tear down the shell. |
110 Shell::DeleteInstance(); | 110 Shell::DeleteInstance(); |
111 test_screenshot_delegate_ = NULL; | 111 test_screenshot_delegate_ = NULL; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 bool AshTestHelper::SupportsHostWindowResize() { | 164 bool AshTestHelper::SupportsHostWindowResize() { |
165 #if defined(OS_WIN) | 165 #if defined(OS_WIN) |
166 return false; | 166 return false; |
167 #else | 167 #else |
168 return true; | 168 return true; |
169 #endif | 169 #endif |
170 } | 170 } |
171 | 171 |
172 } // namespace test | 172 } // namespace test |
173 } // namespace ash | 173 } // namespace ash |
OLD | NEW |