| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/aura/test/aura_test_helper.h" | 5 #include "ui/aura/test/aura_test_helper.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/run_loop.h" |
| 8 #include "ui/aura/client/aura_constants.h" | 9 #include "ui/aura/client/aura_constants.h" |
| 9 #include "ui/aura/env.h" | 10 #include "ui/aura/env.h" |
| 10 #include "ui/aura/focus_manager.h" | 11 #include "ui/aura/focus_manager.h" |
| 11 #include "ui/aura/monitor_manager.h" | 12 #include "ui/aura/monitor_manager.h" |
| 12 #include "ui/aura/root_window.h" | 13 #include "ui/aura/root_window.h" |
| 13 #include "ui/aura/shared/root_window_capture_client.h" | 14 #include "ui/aura/shared/root_window_capture_client.h" |
| 14 #include "ui/aura/single_monitor_manager.h" | 15 #include "ui/aura/single_monitor_manager.h" |
| 15 #include "ui/aura/test/test_activation_client.h" | 16 #include "ui/aura/test/test_activation_client.h" |
| 16 #include "ui/aura/test/test_screen.h" | 17 #include "ui/aura/test/test_screen.h" |
| 17 #include "ui/aura/test/test_stacking_client.h" | 18 #include "ui/aura/test/test_stacking_client.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 stacking_client_.reset(); | 72 stacking_client_.reset(); |
| 72 test_activation_client_.reset(); | 73 test_activation_client_.reset(); |
| 73 root_window_capture_client_.reset(); | 74 root_window_capture_client_.reset(); |
| 74 focus_manager_.reset(); | 75 focus_manager_.reset(); |
| 75 root_window_.reset(); | 76 root_window_.reset(); |
| 76 aura::Env::DeleteInstance(); | 77 aura::Env::DeleteInstance(); |
| 77 } | 78 } |
| 78 | 79 |
| 79 void AuraTestHelper::RunAllPendingInMessageLoop() { | 80 void AuraTestHelper::RunAllPendingInMessageLoop() { |
| 80 #if !defined(OS_MACOSX) | 81 #if !defined(OS_MACOSX) |
| 81 message_loop_->RunAllPendingWithDispatcher( | 82 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them |
| 82 Env::GetInstance()->GetDispatcher()); | 83 // use run_loop.QuitClosure(). |
| 84 base::RunLoop run_loop(Env::GetInstance()->GetDispatcher()); |
| 85 run_loop.RunUntilIdle(); |
| 83 #endif | 86 #endif |
| 84 } | 87 } |
| 85 | 88 |
| 86 } // namespace test | 89 } // namespace test |
| 87 } // namespace aura | 90 } // namespace aura |
| OLD | NEW |