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 "ash/test/ash_test_base.h" | 5 #include "ash/test/ash_test_base.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/display/display_controller.h" | 10 #include "ash/display/display_controller.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 // Tear down the shell. | 130 // Tear down the shell. |
131 Shell::DeleteInstance(); | 131 Shell::DeleteInstance(); |
132 aura::Env::DeleteInstance(); | 132 aura::Env::DeleteInstance(); |
133 ui::TextInputTestSupport::Shutdown(); | 133 ui::TextInputTestSupport::Shutdown(); |
134 #if defined(OS_WIN) | 134 #if defined(OS_WIN) |
135 aura::test::SetUsePopupAsRootWindowForTest(false); | 135 aura::test::SetUsePopupAsRootWindowForTest(false); |
136 // Kill the viewer process if we spun one up. | 136 // Kill the viewer process if we spun one up. |
137 metro_viewer_host_.reset(); | 137 metro_viewer_host_.reset(); |
138 #endif | 138 #endif |
139 event_generator_.reset(); | 139 event_generator_.reset(); |
140 // Some tests set an internal display id, | |
141 // reset it here, so other tests will continue in a clean environment. | |
142 gfx::Display::SetInternalDisplayId(gfx::Display::kInvalidDisplayID); | |
143 } | 140 } |
144 | 141 |
145 aura::test::EventGenerator& AshTestBase::GetEventGenerator() { | 142 aura::test::EventGenerator& AshTestBase::GetEventGenerator() { |
146 if (!event_generator_.get()) { | 143 if (!event_generator_.get()) { |
147 event_generator_.reset( | 144 event_generator_.reset( |
148 new aura::test::EventGenerator(new AshEventGeneratorDelegate())); | 145 new aura::test::EventGenerator(new AshEventGeneratorDelegate())); |
149 } | 146 } |
150 return *event_generator_.get(); | 147 return *event_generator_.get(); |
151 } | 148 } |
152 | 149 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 void AshTestBase::SetUserLoggedIn(bool user_logged_in) { | 245 void AshTestBase::SetUserLoggedIn(bool user_logged_in) { |
249 test_shell_delegate_->SetUserLoggedIn(user_logged_in); | 246 test_shell_delegate_->SetUserLoggedIn(user_logged_in); |
250 } | 247 } |
251 | 248 |
252 void AshTestBase::SetCanLockScreen(bool can_lock_screen) { | 249 void AshTestBase::SetCanLockScreen(bool can_lock_screen) { |
253 test_shell_delegate_->SetCanLockScreen(can_lock_screen); | 250 test_shell_delegate_->SetCanLockScreen(can_lock_screen); |
254 } | 251 } |
255 | 252 |
256 } // namespace test | 253 } // namespace test |
257 } // namespace ash | 254 } // namespace ash |
OLD | NEW |