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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 zero_duration_mode_.reset(); | 127 zero_duration_mode_.reset(); |
128 | 128 |
129 CHECK(!views::corewm::ScopedCaptureClient::IsActive()); | 129 CHECK(!views::corewm::ScopedCaptureClient::IsActive()); |
130 | 130 |
131 wm_state_.reset(); | 131 wm_state_.reset(); |
132 } | 132 } |
133 | 133 |
134 void AshTestHelper::RunAllPendingInMessageLoop() { | 134 void AshTestHelper::RunAllPendingInMessageLoop() { |
135 DCHECK(base::MessageLoopForUI::current() == message_loop_); | 135 DCHECK(base::MessageLoopForUI::current() == message_loop_); |
136 aura::Env::CreateInstance(); | 136 aura::Env::CreateInstance(); |
137 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher()); | 137 base::RunLoop run_loop; |
138 run_loop.RunUntilIdle(); | 138 run_loop.RunUntilIdle(); |
139 } | 139 } |
140 | 140 |
141 aura::Window* AshTestHelper::CurrentContext() { | 141 aura::Window* AshTestHelper::CurrentContext() { |
142 aura::Window* root_window = Shell::GetTargetRootWindow(); | 142 aura::Window* root_window = Shell::GetTargetRootWindow(); |
143 if (!root_window) | 143 if (!root_window) |
144 root_window = Shell::GetPrimaryRootWindow(); | 144 root_window = Shell::GetPrimaryRootWindow(); |
145 DCHECK(root_window); | 145 DCHECK(root_window); |
146 return root_window; | 146 return root_window; |
147 } | 147 } |
148 | 148 |
149 } // namespace test | 149 } // namespace test |
150 } // namespace ash | 150 } // namespace ash |
OLD | NEW |