| 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/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "ui/aura/client/aura_constants.h" | 9 #include "ui/aura/client/aura_constants.h" |
| 10 #include "ui/aura/client/default_activation_client.h" | 10 #include "ui/aura/client/default_activation_client.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 void AuraTestHelper::TearDown() { | 99 void AuraTestHelper::TearDown() { |
| 100 teardown_called_ = true; | 100 teardown_called_ = true; |
| 101 test_input_method_.reset(); | 101 test_input_method_.reset(); |
| 102 stacking_client_.reset(); | 102 stacking_client_.reset(); |
| 103 activation_client_.reset(); | 103 activation_client_.reset(); |
| 104 capture_client_.reset(); | 104 capture_client_.reset(); |
| 105 focus_client_.reset(); | 105 focus_client_.reset(); |
| 106 client::SetFocusClient(root_window(), NULL); | 106 client::SetFocusClient(root_window(), NULL); |
| 107 root_window_.reset(); | 107 root_window_.reset(); |
| 108 ui::GestureRecognizer::Reset(); | |
| 109 test_screen_.reset(); | 108 test_screen_.reset(); |
| 110 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, NULL); | 109 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, NULL); |
| 111 | 110 |
| 112 #if defined(USE_X11) | 111 #if defined(USE_X11) |
| 113 ui::ResetXCursorCache(); | 112 ui::ResetXCursorCache(); |
| 114 #endif | 113 #endif |
| 115 | 114 |
| 116 ui::ShutdownInputMethodForTesting(); | 115 ui::ShutdownInputMethodForTesting(); |
| 117 | 116 |
| 118 Env::DeleteInstance(); | 117 Env::DeleteInstance(); |
| 119 | 118 |
| 120 ui::TerminateContextFactoryForTests(); | 119 ui::TerminateContextFactoryForTests(); |
| 121 } | 120 } |
| 122 | 121 |
| 123 void AuraTestHelper::RunAllPendingInMessageLoop() { | 122 void AuraTestHelper::RunAllPendingInMessageLoop() { |
| 124 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them | 123 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them |
| 125 // use run_loop.QuitClosure(). | 124 // use run_loop.QuitClosure(). |
| 126 base::RunLoop run_loop(Env::GetInstance()->GetDispatcher()); | 125 base::RunLoop run_loop(Env::GetInstance()->GetDispatcher()); |
| 127 run_loop.RunUntilIdle(); | 126 run_loop.RunUntilIdle(); |
| 128 } | 127 } |
| 129 | 128 |
| 130 } // namespace test | 129 } // namespace test |
| 131 } // namespace aura | 130 } // namespace aura |
| OLD | NEW |