Index: ash/root_window_controller_unittest.cc |
diff --git a/ash/root_window_controller_unittest.cc b/ash/root_window_controller_unittest.cc |
index 67842f0f531d1e74d584bd21b986acf22f025d8b..67adc4a0589a6594fa533a89620161918e1f3ca6 100644 |
--- a/ash/root_window_controller_unittest.cc |
+++ b/ash/root_window_controller_unittest.cc |
@@ -2,11 +2,16 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include "ash/root_window_controller.h" |
+ |
#include "ash/display/display_controller.h" |
#include "ash/display/multi_display_manager.h" |
#include "ash/shell.h" |
+#include "ash/shell_delegate.h" |
#include "ash/shell_window_ids.h" |
+#include "ash/system/tray/system_tray_delegate.h" |
#include "ash/test/ash_test_base.h" |
+#include "ash/wm/system_modal_container_layout_manager.h" |
#include "ash/wm/window_util.h" |
#include "ui/aura/env.h" |
#include "ui/aura/focus_manager.h" |
@@ -210,5 +215,25 @@ TEST_F(RootWindowControllerTest, MoveWindows_Modal) { |
EXPECT_TRUE(wm::IsActiveWindow(modal->GetNativeView())); |
} |
+TEST_F(RootWindowControllerTest, ModalContainer) { |
+ UpdateDisplay("600x600"); |
+ Shell* shell = Shell::GetInstance(); |
+ internal::RootWindowController* controller = |
+ shell->GetPrimaryRootWindowController(); |
+ EXPECT_EQ(user::LOGGED_IN_USER, |
+ shell->tray_delegate()->GetUserLoginStatus()); |
+ EXPECT_EQ(Shell::GetContainer(controller->root_window(), |
+ internal::kShellWindowId_SystemModalContainer)->layout_manager(), |
+ controller->GetSystemModalLayoutManager(NULL)); |
+ |
+ shell->delegate()->LockScreen(); |
+ EXPECT_EQ(user::LOGGED_IN_LOCKED, |
+ shell->tray_delegate()->GetUserLoginStatus()); |
+ EXPECT_EQ(Shell::GetContainer(controller->root_window(), |
+ internal::kShellWindowId_LockSystemModalContainer)->layout_manager(), |
+ controller->GetSystemModalLayoutManager(NULL)); |
+ shell->delegate()->UnlockScreen(); |
+} |
+ |
} // namespace test |
} // namespace ash |