Index: ash/test/test_session_state_delegate.cc |
diff --git a/ash/test/test_session_state_delegate.cc b/ash/test/test_session_state_delegate.cc |
index 5c341e66ec4fed9dd49fbb24398c87018791e1e8..9c39a9e43b5c3a0c5062aee75f9c67acc0230373 100644 |
--- a/ash/test/test_session_state_delegate.cc |
+++ b/ash/test/test_session_state_delegate.cc |
@@ -8,6 +8,7 @@ |
#include <string> |
#include "ash/common/login_status.h" |
+#include "ash/common/wm_shell.h" |
#include "ash/shell.h" |
#include "base/memory/ptr_util.h" |
#include "base/strings/string16.h" |
@@ -182,8 +183,12 @@ void TestSessionStateDelegate::SetActiveUserSessionStarted( |
} |
} |
+// static |
void TestSessionStateDelegate::SetCanLockScreen(bool can_lock_screen) { |
- can_lock_screen_ = can_lock_screen; |
+ CHECK(WmShell::HasInstance()); |
+ static_cast<ash::test::TestSessionStateDelegate*>( |
+ WmShell::Get()->GetSessionStateDelegate()) |
+ ->can_lock_screen_ = can_lock_screen; |
} |
void TestSessionStateDelegate::SetShouldLockScreenBeforeSuspending( |