Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: ash/test/ash_test_base.cc

Issue 14295008: Add ash SessionStateDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ready for review. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
17 #include "ash/test/test_shell_delegate.h" 18 #include "ash/test/test_shell_delegate.h"
18 #include "ash/wm/coordinate_conversion.h" 19 #include "ash/wm/coordinate_conversion.h"
19 #include "base/command_line.h" 20 #include "base/command_line.h"
20 #include "base/run_loop.h" 21 #include "base/run_loop.h"
21 #include "content/public/test/web_contents_tester.h" 22 #include "content/public/test/web_contents_tester.h"
22 #include "ui/aura/client/aura_constants.h" 23 #include "ui/aura/client/aura_constants.h"
23 #include "ui/aura/client/screen_position_client.h" 24 #include "ui/aura/client/screen_position_client.h"
24 #include "ui/aura/env.h" 25 #include "ui/aura/env.h"
25 #include "ui/aura/root_window.h" 26 #include "ui/aura/root_window.h"
26 #include "ui/aura/test/event_generator.h" 27 #include "ui/aura/test/event_generator.h"
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 269
269 void AshTestBase::RunAllPendingInMessageLoop() { 270 void AshTestBase::RunAllPendingInMessageLoop() {
270 #if !defined(OS_MACOSX) 271 #if !defined(OS_MACOSX)
271 DCHECK(MessageLoopForUI::current() == &message_loop_); 272 DCHECK(MessageLoopForUI::current() == &message_loop_);
272 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher()); 273 base::RunLoop run_loop(aura::Env::GetInstance()->GetDispatcher());
273 run_loop.RunUntilIdle(); 274 run_loop.RunUntilIdle();
274 #endif 275 #endif
275 } 276 }
276 277
277 void AshTestBase::SetSessionStarted(bool session_started) { 278 void AshTestBase::SetSessionStarted(bool session_started) {
278 test_shell_delegate_->SetSessionStarted(session_started); 279 test_shell_delegate_->test_session_state_delegate()->
280 SetActiveUserSessionStarted(session_started);
279 } 281 }
280 282
281 void AshTestBase::SetUserLoggedIn(bool user_logged_in) { 283 void AshTestBase::SetUserLoggedIn(bool user_logged_in) {
282 test_shell_delegate_->SetUserLoggedIn(user_logged_in); 284 test_shell_delegate_->test_session_state_delegate()->
285 SetHasActiveUser(user_logged_in);
283 } 286 }
284 287
285 void AshTestBase::SetCanLockScreen(bool can_lock_screen) { 288 void AshTestBase::SetCanLockScreen(bool can_lock_screen) {
286 test_shell_delegate_->SetCanLockScreen(can_lock_screen); 289 test_shell_delegate_->test_session_state_delegate()->
290 SetCanLockScreen(can_lock_screen);
287 } 291 }
288 292
289 } // namespace test 293 } // namespace test
290 } // namespace ash 294 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698