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.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
8 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/test/display_manager_test_api.h" | 10 #include "ash/test/display_manager_test_api.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 ui::ShutdownInputMethodForTesting(); | 131 ui::ShutdownInputMethodForTesting(); |
132 zero_duration_mode_.reset(); | 132 zero_duration_mode_.reset(); |
133 | 133 |
134 CHECK(!wm::ScopedCaptureClient::IsActive()); | 134 CHECK(!wm::ScopedCaptureClient::IsActive()); |
135 | 135 |
136 wm_state_.reset(); | 136 wm_state_.reset(); |
137 } | 137 } |
138 | 138 |
139 void AshTestHelper::RunAllPendingInMessageLoop() { | 139 void AshTestHelper::RunAllPendingInMessageLoop() { |
140 DCHECK(base::MessageLoopForUI::current() == message_loop_); | 140 DCHECK(base::MessageLoopForUI::current() == message_loop_); |
141 aura::Env::CreateInstance(); | 141 aura::Env::CreateInstance(true); |
142 base::RunLoop run_loop; | 142 base::RunLoop run_loop; |
143 run_loop.RunUntilIdle(); | 143 run_loop.RunUntilIdle(); |
144 } | 144 } |
145 | 145 |
146 aura::Window* AshTestHelper::CurrentContext() { | 146 aura::Window* AshTestHelper::CurrentContext() { |
147 aura::Window* root_window = Shell::GetTargetRootWindow(); | 147 aura::Window* root_window = Shell::GetTargetRootWindow(); |
148 if (!root_window) | 148 if (!root_window) |
149 root_window = Shell::GetPrimaryRootWindow(); | 149 root_window = Shell::GetPrimaryRootWindow(); |
150 DCHECK(root_window); | 150 DCHECK(root_window); |
151 return root_window; | 151 return root_window; |
(...skipping 12 matching lines...) Expand all Loading... |
164 bool AshTestHelper::SupportsHostWindowResize() { | 164 bool AshTestHelper::SupportsHostWindowResize() { |
165 #if defined(OS_WIN) | 165 #if defined(OS_WIN) |
166 return false; | 166 return false; |
167 #else | 167 #else |
168 return true; | 168 return true; |
169 #endif | 169 #endif |
170 } | 170 } |
171 | 171 |
172 } // namespace test | 172 } // namespace test |
173 } // namespace ash | 173 } // namespace ash |
OLD | NEW |