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

Unified Diff: ash/shell_unittest.cc

Issue 2801333002: mash: Run pre-unlock animation via SessionController (Closed)
Patch Set: fix compile Created 3 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 side-by-side diff with in-line comments
Download patch
Index: ash/shell_unittest.cc
diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc
index d15aee8f09e4566a679d2df4e0a07b1c552ee878..ad202de8b918a5532449b1c705abb2c387b74305 100644
--- a/ash/shell_unittest.cc
+++ b/ash/shell_unittest.cc
@@ -164,13 +164,17 @@ class ShellTest : public test::AshTestBase {
// Create a LockScreen window.
views::Widget::InitParams widget_params(
views::Widget::InitParams::TYPE_WINDOW);
- SessionController* controller = Shell::Get()->session_controller();
- controller->LockScreenAndFlushForTest();
views::Widget* lock_widget = CreateTestWindow(widget_params);
Shell::GetContainer(Shell::GetPrimaryRootWindow(),
kShellWindowId_LockScreenContainer)
->AddChild(lock_widget->GetNativeView());
lock_widget->Show();
+
+ // Simulate real screen locker to change session state to LOCKED
+ // when it is shown.
+ SessionController* controller = Shell::Get()->session_controller();
+ controller->LockScreenAndFlushForTest();
+
EXPECT_TRUE(controller->IsScreenLocked());
EXPECT_TRUE(lock_widget->GetNativeView()->HasFocus());

Powered by Google App Engine
This is Rietveld 408576698