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/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/test/display_manager_test_api.h" | 9 #include "ash/test/display_manager_test_api.h" |
10 #include "ash/test/shell_test_api.h" | 10 #include "ash/test/shell_test_api.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 #endif | 83 #endif |
84 | 84 |
85 aura::Env::DeleteInstance(); | 85 aura::Env::DeleteInstance(); |
86 ui::TextInputTestSupport::Shutdown(); | 86 ui::TextInputTestSupport::Shutdown(); |
87 | 87 |
88 zero_duration_mode_.reset(); | 88 zero_duration_mode_.reset(); |
89 } | 89 } |
90 | 90 |
91 void AshTestHelper::RunAllPendingInMessageLoop() { | 91 void AshTestHelper::RunAllPendingInMessageLoop() { |
92 #if !defined(OS_MACOSX) | 92 #if !defined(OS_MACOSX) |
93 DCHECK(MessageLoopForUI::current() == message_loop_); | 93 DCHECK(base::MessageLoopForUI::current() == message_loop_); |
94 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher()); | 94 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher()); |
95 run_loop.RunUntilIdle(); | 95 run_loop.RunUntilIdle(); |
96 #endif | 96 #endif |
97 } | 97 } |
98 | 98 |
99 aura::RootWindow* AshTestHelper::CurrentContext() { | 99 aura::RootWindow* AshTestHelper::CurrentContext() { |
100 aura::RootWindow* root_window = Shell::GetActiveRootWindow(); | 100 aura::RootWindow* root_window = Shell::GetActiveRootWindow(); |
101 if (!root_window) | 101 if (!root_window) |
102 root_window = Shell::GetPrimaryRootWindow(); | 102 root_window = Shell::GetPrimaryRootWindow(); |
103 DCHECK(root_window); | 103 DCHECK(root_window); |
104 return root_window; | 104 return root_window; |
105 } | 105 } |
106 | 106 |
107 } // namespace test | 107 } // namespace test |
108 } // namespace ash | 108 } // namespace ash |
OLD | NEW |