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/ash_switches.h" | 10 #include "ash/ash_switches.h" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 kViewerProcessArgument); | 179 kViewerProcessArgument); |
180 #endif | 180 #endif |
181 | 181 |
182 event_generator_.reset(); | 182 event_generator_.reset(); |
183 // Some tests set an internal display id, | 183 // Some tests set an internal display id, |
184 // reset it here, so other tests will continue in a clean environment. | 184 // reset it here, so other tests will continue in a clean environment. |
185 gfx::Display::SetInternalDisplayId(gfx::Display::kInvalidDisplayID); | 185 gfx::Display::SetInternalDisplayId(gfx::Display::kInvalidDisplayID); |
186 } | 186 } |
187 | 187 |
188 aura::test::EventGenerator& AshTestBase::GetEventGenerator() { | 188 aura::test::EventGenerator& AshTestBase::GetEventGenerator() { |
189 if (!event_generator_.get()) { | 189 if (!event_generator_) { |
190 event_generator_.reset( | 190 event_generator_.reset( |
191 new aura::test::EventGenerator(new AshEventGeneratorDelegate())); | 191 new aura::test::EventGenerator(new AshEventGeneratorDelegate())); |
192 } | 192 } |
193 return *event_generator_.get(); | 193 return *event_generator_.get(); |
194 } | 194 } |
195 | 195 |
196 void AshTestBase::UpdateDisplay(const std::string& display_specs) { | 196 void AshTestBase::UpdateDisplay(const std::string& display_specs) { |
197 DisplayManagerTestApi display_manager_test_api( | 197 DisplayManagerTestApi display_manager_test_api( |
198 Shell::GetInstance()->display_manager()); | 198 Shell::GetInstance()->display_manager()); |
199 display_manager_test_api.UpdateDisplay(display_specs); | 199 display_manager_test_api.UpdateDisplay(display_specs); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 void AshTestBase::SetUserLoggedIn(bool user_logged_in) { | 281 void AshTestBase::SetUserLoggedIn(bool user_logged_in) { |
282 test_shell_delegate_->SetUserLoggedIn(user_logged_in); | 282 test_shell_delegate_->SetUserLoggedIn(user_logged_in); |
283 } | 283 } |
284 | 284 |
285 void AshTestBase::SetCanLockScreen(bool can_lock_screen) { | 285 void AshTestBase::SetCanLockScreen(bool can_lock_screen) { |
286 test_shell_delegate_->SetCanLockScreen(can_lock_screen); | 286 test_shell_delegate_->SetCanLockScreen(can_lock_screen); |
287 } | 287 } |
288 | 288 |
289 } // namespace test | 289 } // namespace test |
290 } // namespace ash | 290 } // namespace ash |
OLD | NEW |