| 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_delegate_aura.h" | 7 #include "ash/accelerators/accelerator_controller_delegate_aura.h" |
| 8 #include "ash/common/material_design/material_design_controller.h" | 8 #include "ash/common/material_design/material_design_controller.h" |
| 9 #include "ash/common/test/material_design_controller_test_api.h" | 9 #include "ash/common/test/material_design_controller_test_api.h" |
| 10 #include "ash/common/test/test_new_window_client.h" |
| 10 #include "ash/common/test/test_session_state_delegate.h" | 11 #include "ash/common/test/test_session_state_delegate.h" |
| 11 #include "ash/common/test/test_system_tray_delegate.h" | 12 #include "ash/common/test/test_system_tray_delegate.h" |
| 13 #include "ash/common/test/wm_shell_test_api.h" |
| 12 #include "ash/common/wm_shell.h" | 14 #include "ash/common/wm_shell.h" |
| 13 #include "ash/shell.h" | 15 #include "ash/shell.h" |
| 14 #include "ash/shell_init_params.h" | 16 #include "ash/shell_init_params.h" |
| 15 #include "ash/test/ash_test_environment.h" | 17 #include "ash/test/ash_test_environment.h" |
| 16 #include "ash/test/ash_test_views_delegate.h" | 18 #include "ash/test/ash_test_views_delegate.h" |
| 17 #include "ash/test/display_manager_test_api.h" | 19 #include "ash/test/display_manager_test_api.h" |
| 18 #include "ash/test/shell_test_api.h" | 20 #include "ash/test/shell_test_api.h" |
| 19 #include "ash/test/test_screenshot_delegate.h" | 21 #include "ash/test/test_screenshot_delegate.h" |
| 20 #include "ash/test/test_shell_delegate.h" | 22 #include "ash/test/test_shell_delegate.h" |
| 21 #include "base/run_loop.h" | 23 #include "base/run_loop.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 shell->screen_layout_observer()->set_show_notifications_for_testing(false); | 146 shell->screen_layout_observer()->set_show_notifications_for_testing(false); |
| 145 #endif | 147 #endif |
| 146 | 148 |
| 147 test::DisplayManagerTestApi(Shell::GetInstance()->display_manager()) | 149 test::DisplayManagerTestApi(Shell::GetInstance()->display_manager()) |
| 148 .DisableChangeDisplayUponHostResize(); | 150 .DisableChangeDisplayUponHostResize(); |
| 149 ShellTestApi(shell).DisableDisplayAnimator(); | 151 ShellTestApi(shell).DisableDisplayAnimator(); |
| 150 | 152 |
| 151 test_screenshot_delegate_ = new TestScreenshotDelegate(); | 153 test_screenshot_delegate_ = new TestScreenshotDelegate(); |
| 152 shell->accelerator_controller_delegate()->SetScreenshotDelegate( | 154 shell->accelerator_controller_delegate()->SetScreenshotDelegate( |
| 153 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); | 155 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); |
| 156 |
| 157 WmShellTestApi().SetNewWindowClient(base::MakeUnique<TestNewWindowClient>()); |
| 154 } | 158 } |
| 155 | 159 |
| 156 void AshTestHelper::TearDown() { | 160 void AshTestHelper::TearDown() { |
| 157 // Tear down the shell. | 161 // Tear down the shell. |
| 158 Shell::DeleteInstance(); | 162 Shell::DeleteInstance(); |
| 159 material_design_state_.reset(); | 163 material_design_state_.reset(); |
| 160 test::MaterialDesignControllerTestAPI::Uninitialize(); | 164 test::MaterialDesignControllerTestAPI::Uninitialize(); |
| 161 ash_test_environment_->TearDown(); | 165 ash_test_environment_->TearDown(); |
| 162 | 166 |
| 163 test_screenshot_delegate_ = NULL; | 167 test_screenshot_delegate_ = NULL; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 bool AshTestHelper::SupportsMultipleDisplays() { | 218 bool AshTestHelper::SupportsMultipleDisplays() { |
| 215 #if defined(OS_WIN) | 219 #if defined(OS_WIN) |
| 216 return false; | 220 return false; |
| 217 #else | 221 #else |
| 218 return true; | 222 return true; |
| 219 #endif | 223 #endif |
| 220 } | 224 } |
| 221 | 225 |
| 222 } // namespace test | 226 } // namespace test |
| 223 } // namespace ash | 227 } // namespace ash |
| OLD | NEW |