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_new_window_client.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 test_screenshot_delegate_ = new TestScreenshotDelegate(); | 156 test_screenshot_delegate_ = new TestScreenshotDelegate(); |
157 shell->accelerator_controller_delegate()->SetScreenshotDelegate( | 157 shell->accelerator_controller_delegate()->SetScreenshotDelegate( |
158 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); | 158 std::unique_ptr<ScreenshotDelegate>(test_screenshot_delegate_)); |
159 | 159 |
160 WmShellTestApi().SetNewWindowClient(base::MakeUnique<TestNewWindowClient>()); | 160 WmShellTestApi().SetNewWindowClient(base::MakeUnique<TestNewWindowClient>()); |
161 } | 161 } |
162 | 162 |
163 void AshTestHelper::TearDown() { | 163 void AshTestHelper::TearDown() { |
164 // Tear down the shell. | 164 // Tear down the shell. |
165 Shell::DeleteInstance(); | 165 Shell::DeleteInstance(); |
| 166 RunAllPendingInMessageLoop(); |
166 material_design_state_.reset(); | 167 material_design_state_.reset(); |
167 test::MaterialDesignControllerTestAPI::Uninitialize(); | 168 test::MaterialDesignControllerTestAPI::Uninitialize(); |
168 ash_test_environment_->TearDown(); | 169 ash_test_environment_->TearDown(); |
169 | 170 |
170 test_screenshot_delegate_ = NULL; | 171 test_screenshot_delegate_ = NULL; |
171 | 172 |
172 // Remove global message center state. | 173 // Remove global message center state. |
173 message_center::MessageCenter::Shutdown(); | 174 message_center::MessageCenter::Shutdown(); |
174 | 175 |
175 #if defined(OS_CHROMEOS) | 176 #if defined(OS_CHROMEOS) |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 bool AshTestHelper::SupportsMultipleDisplays() { | 221 bool AshTestHelper::SupportsMultipleDisplays() { |
221 #if defined(OS_WIN) | 222 #if defined(OS_WIN) |
222 return false; | 223 return false; |
223 #else | 224 #else |
224 return true; | 225 return true; |
225 #endif | 226 #endif |
226 } | 227 } |
227 | 228 |
228 } // namespace test | 229 } // namespace test |
229 } // namespace ash | 230 } // namespace ash |
OLD | NEW |