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