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

Unified Diff: ash/shell_unittest.cc

Issue 2801333002: mash: Run pre-unlock animation via SessionController (Closed)
Patch Set: rebase 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
« no previous file with comments | « ash/shell.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell_unittest.cc
diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc
index c79a092d893fef3472ce395760902cac01190684..5c78575072b1e8018e0b2082efbb27455aa652bd 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());
« no previous file with comments | « ash/shell.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698