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

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

Issue 108213009: Adds TraySessionLengthLimitTest to ash_unittests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ASH_EXPORT to SessionLengthLimitObserver Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « ash/test/ash_test_base.h ('k') | ash/test/test_system_tray_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/screen_ash.h" 12 #include "ash/screen_ash.h"
13 #include "ash/shell.h" 13 #include "ash/shell.h"
14 #include "ash/shell/toplevel_window.h" 14 #include "ash/shell/toplevel_window.h"
15 #include "ash/test/ash_test_helper.h" 15 #include "ash/test/ash_test_helper.h"
16 #include "ash/test/display_manager_test_api.h" 16 #include "ash/test/display_manager_test_api.h"
17 #include "ash/test/test_session_state_delegate.h" 17 #include "ash/test/test_session_state_delegate.h"
18 #include "ash/test/test_shell_delegate.h" 18 #include "ash/test/test_shell_delegate.h"
19 #include "ash/test/test_system_tray_delegate.h"
19 #include "ash/wm/coordinate_conversion.h" 20 #include "ash/wm/coordinate_conversion.h"
20 #include "ash/wm/window_positioner.h" 21 #include "ash/wm/window_positioner.h"
21 #include "base/command_line.h" 22 #include "base/command_line.h"
22 #include "content/public/test/web_contents_tester.h" 23 #include "content/public/test/web_contents_tester.h"
23 #include "ui/aura/client/aura_constants.h" 24 #include "ui/aura/client/aura_constants.h"
24 #include "ui/aura/client/screen_position_client.h" 25 #include "ui/aura/client/screen_position_client.h"
25 #include "ui/aura/client/window_tree_client.h" 26 #include "ui/aura/client/window_tree_client.h"
26 #include "ui/aura/root_window.h" 27 #include "ui/aura/root_window.h"
27 #include "ui/aura/test/event_generator.h" 28 #include "ui/aura/test/event_generator.h"
28 #include "ui/aura/test/test_window_delegate.h" 29 #include "ui/aura/test/test_window_delegate.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 } 280 }
280 281
281 void AshTestBase::RunAllPendingInMessageLoop() { 282 void AshTestBase::RunAllPendingInMessageLoop() {
282 ash_test_helper_->RunAllPendingInMessageLoop(); 283 ash_test_helper_->RunAllPendingInMessageLoop();
283 } 284 }
284 285
285 TestScreenshotDelegate* AshTestBase::GetScreenshotDelegate() { 286 TestScreenshotDelegate* AshTestBase::GetScreenshotDelegate() {
286 return ash_test_helper_->test_screenshot_delegate(); 287 return ash_test_helper_->test_screenshot_delegate();
287 } 288 }
288 289
290 TestSystemTrayDelegate* AshTestBase::GetSystemTrayDelegate() {
291 return static_cast<TestSystemTrayDelegate*>(
292 Shell::GetInstance()->system_tray_delegate());
293 }
294
289 void AshTestBase::SetSessionStarted(bool session_started) { 295 void AshTestBase::SetSessionStarted(bool session_started) {
290 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()-> 296 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()->
291 SetActiveUserSessionStarted(session_started); 297 SetActiveUserSessionStarted(session_started);
292 } 298 }
293 299
294 void AshTestBase::SetUserLoggedIn(bool user_logged_in) { 300 void AshTestBase::SetUserLoggedIn(bool user_logged_in) {
295 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()-> 301 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()->
296 SetHasActiveUser(user_logged_in); 302 SetHasActiveUser(user_logged_in);
297 } 303 }
298 304
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 340
335 void AshTestBase::UnblockUserSession() { 341 void AshTestBase::UnblockUserSession() {
336 Shell::GetInstance()->session_state_delegate()->UnlockScreen(); 342 Shell::GetInstance()->session_state_delegate()->UnlockScreen();
337 SetSessionStarted(true); 343 SetSessionStarted(true);
338 SetUserAddingScreenRunning(false); 344 SetUserAddingScreenRunning(false);
339 } 345 }
340 346
341 347
342 } // namespace test 348 } // namespace test
343 } // namespace ash 349 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/ash_test_base.h ('k') | ash/test/test_system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698