| 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" |
| 11 #include "ash/display/display_controller.h" | 11 #include "ash/display/display_controller.h" |
| 12 #include "ash/display/display_manager.h" | 12 #include "ash/display/display_manager.h" |
| 13 #include "ash/screen_ash.h" | 13 #include "ash/screen_ash.h" |
| 14 #include "ash/shell.h" | 14 #include "ash/shell.h" |
| 15 #include "ash/test/display_manager_test_api.h" | 15 #include "ash/test/display_manager_test_api.h" |
| 16 #include "ash/test/shell_test_api.h" | 16 #include "ash/test/shell_test_api.h" |
| 17 #include "ash/test/test_session_state_delegate.h" | |
| 18 #include "ash/test/test_shell_delegate.h" | 17 #include "ash/test/test_shell_delegate.h" |
| 19 #include "ash/wm/coordinate_conversion.h" | 18 #include "ash/wm/coordinate_conversion.h" |
| 20 #include "base/command_line.h" | 19 #include "base/command_line.h" |
| 21 #include "base/run_loop.h" | 20 #include "base/run_loop.h" |
| 22 #include "content/public/test/web_contents_tester.h" | 21 #include "content/public/test/web_contents_tester.h" |
| 23 #include "ui/aura/client/aura_constants.h" | 22 #include "ui/aura/client/aura_constants.h" |
| 24 #include "ui/aura/client/screen_position_client.h" | 23 #include "ui/aura/client/screen_position_client.h" |
| 25 #include "ui/aura/env.h" | 24 #include "ui/aura/env.h" |
| 26 #include "ui/aura/root_window.h" | 25 #include "ui/aura/root_window.h" |
| 27 #include "ui/aura/test/event_generator.h" | 26 #include "ui/aura/test/event_generator.h" |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 | 268 |
| 270 void AshTestBase::RunAllPendingInMessageLoop() { | 269 void AshTestBase::RunAllPendingInMessageLoop() { |
| 271 #if !defined(OS_MACOSX) | 270 #if !defined(OS_MACOSX) |
| 272 DCHECK(MessageLoopForUI::current() == &message_loop_); | 271 DCHECK(MessageLoopForUI::current() == &message_loop_); |
| 273 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher()); | 272 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher()); |
| 274 run_loop.RunUntilIdle(); | 273 run_loop.RunUntilIdle(); |
| 275 #endif | 274 #endif |
| 276 } | 275 } |
| 277 | 276 |
| 278 void AshTestBase::SetSessionStarted(bool session_started) { | 277 void AshTestBase::SetSessionStarted(bool session_started) { |
| 279 test_shell_delegate_->test_session_state_delegate()-> | 278 test_shell_delegate_->SetSessionStarted(session_started); |
| 280 SetActiveUserSessionStarted(session_started); | |
| 281 } | 279 } |
| 282 | 280 |
| 283 void AshTestBase::SetUserLoggedIn(bool user_logged_in) { | 281 void AshTestBase::SetUserLoggedIn(bool user_logged_in) { |
| 284 test_shell_delegate_->test_session_state_delegate()-> | 282 test_shell_delegate_->SetUserLoggedIn(user_logged_in); |
| 285 SetHasActiveUser(user_logged_in); | |
| 286 } | 283 } |
| 287 | 284 |
| 288 void AshTestBase::SetCanLockScreen(bool can_lock_screen) { | 285 void AshTestBase::SetCanLockScreen(bool can_lock_screen) { |
| 289 test_shell_delegate_->test_session_state_delegate()-> | 286 test_shell_delegate_->SetCanLockScreen(can_lock_screen); |
| 290 SetCanLockScreen(can_lock_screen); | |
| 291 } | 287 } |
| 292 | 288 |
| 293 } // namespace test | 289 } // namespace test |
| 294 } // namespace ash | 290 } // namespace ash |
| OLD | NEW |