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_session_state_delegate.h" | 10 #include "ash/common/test/test_session_state_delegate.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 ShellTestApi(shell).DisableDisplayAnimator(); | 153 ShellTestApi(shell).DisableDisplayAnimator(); |
154 | 154 |
155 test_screenshot_delegate_ = new TestScreenshotDelegate(); | 155 test_screenshot_delegate_ = new TestScreenshotDelegate(); |
156 shell->accelerator_controller_delegate()->SetScreenshotDelegate( | 156 shell->accelerator_controller_delegate()->SetScreenshotDelegate( |
157 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); | 157 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); |
158 } | 158 } |
159 | 159 |
160 void AshTestHelper::TearDown() { | 160 void AshTestHelper::TearDown() { |
161 // Tear down the shell. | 161 // Tear down the shell. |
162 Shell::DeleteInstance(); | 162 Shell::DeleteInstance(); |
163 | |
164 // Suspend the tear down until all resources are returned via | |
165 // MojoCompositorFrameSinkClient::ReclaimResources() | |
166 RunAllPendingInMessageLoop(); | |
167 material_design_state_.reset(); | 163 material_design_state_.reset(); |
168 test::MaterialDesignControllerTestAPI::Uninitialize(); | 164 test::MaterialDesignControllerTestAPI::Uninitialize(); |
169 ash_test_environment_->TearDown(); | 165 ash_test_environment_->TearDown(); |
170 | 166 |
171 test_screenshot_delegate_ = NULL; | 167 test_screenshot_delegate_ = NULL; |
172 | 168 |
173 // Remove global message center state. | 169 // Remove global message center state. |
174 message_center::MessageCenter::Shutdown(); | 170 message_center::MessageCenter::Shutdown(); |
175 | 171 |
176 #if defined(OS_CHROMEOS) | 172 #if defined(OS_CHROMEOS) |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 bool AshTestHelper::SupportsMultipleDisplays() { | 217 bool AshTestHelper::SupportsMultipleDisplays() { |
222 #if defined(OS_WIN) | 218 #if defined(OS_WIN) |
223 return false; | 219 return false; |
224 #else | 220 #else |
225 return true; | 221 return true; |
226 #endif | 222 #endif |
227 } | 223 } |
228 | 224 |
229 } // namespace test | 225 } // namespace test |
230 } // namespace ash | 226 } // namespace ash |
OLD | NEW |