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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 CHECK(!views::corewm::ScopedCaptureClient::IsActive()); | 121 CHECK(!views::corewm::ScopedCaptureClient::IsActive()); |
122 } | 122 } |
123 | 123 |
124 void AshTestHelper::RunAllPendingInMessageLoop() { | 124 void AshTestHelper::RunAllPendingInMessageLoop() { |
125 DCHECK(base::MessageLoopForUI::current() == message_loop_); | 125 DCHECK(base::MessageLoopForUI::current() == message_loop_); |
126 aura::Env::CreateInstance(); | 126 aura::Env::CreateInstance(); |
127 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher()); | 127 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher()); |
128 run_loop.RunUntilIdle(); | 128 run_loop.RunUntilIdle(); |
129 } | 129 } |
130 | 130 |
131 aura::RootWindow* AshTestHelper::CurrentContext() { | 131 aura::Window* AshTestHelper::CurrentContext() { |
132 aura::RootWindow* root_window = Shell::GetTargetRootWindow(); | 132 aura::Window* root_window = Shell::GetTargetRootWindow(); |
133 if (!root_window) | 133 if (!root_window) |
134 root_window = Shell::GetPrimaryRootWindow(); | 134 root_window = Shell::GetPrimaryRootWindow(); |
135 DCHECK(root_window); | 135 DCHECK(root_window); |
136 return root_window; | 136 return root_window; |
137 } | 137 } |
138 | 138 |
139 } // namespace test | 139 } // namespace test |
140 } // namespace ash | 140 } // namespace ash |
OLD | NEW |