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 "base/run_loop.h" |
9 #include "ui/aura/client/aura_constants.h" | 9 #include "ui/aura/client/aura_constants.h" |
10 #include "ui/aura/env.h" | 10 #include "ui/aura/env.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 void AuraTestHelper::TearDown() { | 70 void AuraTestHelper::TearDown() { |
71 teardown_called_ = true; | 71 teardown_called_ = true; |
72 test_input_method_.reset(); | 72 test_input_method_.reset(); |
73 stacking_client_.reset(); | 73 stacking_client_.reset(); |
74 test_activation_client_.reset(); | 74 test_activation_client_.reset(); |
75 root_window_capture_client_.reset(); | 75 root_window_capture_client_.reset(); |
76 focus_manager_.reset(); | 76 focus_manager_.reset(); |
77 root_window_.reset(); | 77 root_window_.reset(); |
78 test_screen_.reset(); | 78 test_screen_.reset(); |
| 79 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, NULL); |
79 aura::Env::DeleteInstance(); | 80 aura::Env::DeleteInstance(); |
80 } | 81 } |
81 | 82 |
82 void AuraTestHelper::RunAllPendingInMessageLoop() { | 83 void AuraTestHelper::RunAllPendingInMessageLoop() { |
83 #if !defined(OS_MACOSX) | 84 #if !defined(OS_MACOSX) |
84 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them | 85 // TODO(jbates) crbug.com/134753 Find quitters of this RunLoop and have them |
85 // use run_loop.QuitClosure(). | 86 // use run_loop.QuitClosure(). |
86 base::RunLoop run_loop(Env::GetInstance()->GetDispatcher()); | 87 base::RunLoop run_loop(Env::GetInstance()->GetDispatcher()); |
87 run_loop.RunUntilIdle(); | 88 run_loop.RunUntilIdle(); |
88 #endif | 89 #endif |
89 } | 90 } |
90 | 91 |
91 } // namespace test | 92 } // namespace test |
92 } // namespace aura | 93 } // namespace aura |
OLD | NEW |