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

Unified Diff: ash/root_window_controller_unittest.cc

Issue 11117012: ash: Fix event processing in modal windows in login/lock screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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/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
« ash/root_window_controller.cc ('K') | « ash/root_window_controller.cc ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698