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

Unified Diff: ash/test/ash_test_base.cc

Issue 19945004: Modal window in user session not blocks user adding screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed compilation for win. Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/test/ash_test_base.h ('k') | ash/test/test_session_state_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/ash_test_base.cc
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc
index 6917e0ed92704172046f7e6f0a7b2f9e5a7de35f..2805721f621028d49f7b6245e800fb5ad1a1587b 100644
--- a/ash/test/ash_test_base.cc
+++ b/ash/test/ash_test_base.cc
@@ -289,5 +289,38 @@ void AshTestBase::SetCanLockScreen(bool can_lock_screen) {
SetCanLockScreen(can_lock_screen);
}
+void AshTestBase::SetUserAddingScreenRunning(bool user_adding_screen_running) {
+ ash_test_helper_->test_shell_delegate()->test_session_state_delegate()->
+ SetUserAddingScreenRunning(user_adding_screen_running);
+}
+
+void AshTestBase::BlockUserSession(UserSessionBlockReason block_reason) {
+ switch (block_reason) {
+ case BLOCKED_BY_LOCK_SCREEN:
+ SetSessionStarted(true);
+ SetUserAddingScreenRunning(false);
+ Shell::GetInstance()->session_state_delegate()->LockScreen();
+ break;
+ case BLOCKED_BY_LOGIN_SCREEN:
+ SetUserAddingScreenRunning(false);
+ SetSessionStarted(false);
+ break;
+ case BLOCKED_BY_USER_ADDING_SCREEN:
+ SetUserAddingScreenRunning(true);
+ SetSessionStarted(true);
+ break;
+ default:
+ NOTREACHED();
+ break;
+ }
+}
+
+void AshTestBase::UnblockUserSession() {
+ Shell::GetInstance()->session_state_delegate()->UnlockScreen();
+ SetSessionStarted(true);
+ SetUserAddingScreenRunning(false);
+}
+
+
} // namespace test
} // namespace ash
« no previous file with comments | « ash/test/ash_test_base.h ('k') | ash/test/test_session_state_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698