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