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(); |
108 test_screen_.reset(); | 109 test_screen_.reset(); |
109 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, NULL); | 110 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, NULL); |
110 | 111 |
111 #if defined(USE_X11) | 112 #if defined(USE_X11) |
112 ui::ResetXCursorCache(); | 113 ui::ResetXCursorCache(); |
113 #endif | 114 #endif |
114 | 115 |
115 ui::ShutdownInputMethodForTesting(); | 116 ui::ShutdownInputMethodForTesting(); |
116 | 117 |
117 Env::DeleteInstance(); | 118 Env::DeleteInstance(); |
118 | 119 |
119 ui::TerminateContextFactoryForTests(); | 120 ui::TerminateContextFactoryForTests(); |
120 } | 121 } |
121 | 122 |
122 void AuraTestHelper::RunAllPendingInMessageLoop() { | 123 void AuraTestHelper::RunAllPendingInMessageLoop() { |
123 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them | 124 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them |
124 // use run_loop.QuitClosure(). | 125 // use run_loop.QuitClosure(). |
125 base::RunLoop run_loop(Env::GetInstance()->GetDispatcher()); | 126 base::RunLoop run_loop(Env::GetInstance()->GetDispatcher()); |
126 run_loop.RunUntilIdle(); | 127 run_loop.RunUntilIdle(); |
127 } | 128 } |
128 | 129 |
129 } // namespace test | 130 } // namespace test |
130 } // namespace aura | 131 } // namespace aura |
OLD | NEW |