Index: ash/wm/toplevel_window_event_handler_unittest.cc |
diff --git a/ash/wm/toplevel_window_event_handler_unittest.cc b/ash/wm/toplevel_window_event_handler_unittest.cc |
index 7f3782a0d7710de4e1d90717bdcf95d0135b82e1..7c4f4d6450becd5d55bd07cb74aefda58249f50c 100644 |
--- a/ash/wm/toplevel_window_event_handler_unittest.cc |
+++ b/ash/wm/toplevel_window_event_handler_unittest.cc |
@@ -8,6 +8,7 @@ |
#include "ash/shell.h" |
#include "ash/shell_window_ids.h" |
#include "ash/test/ash_test_base.h" |
+#include "ash/wm/lock_state_controller.h" |
#include "ash/wm/resize_shadow.h" |
#include "ash/wm/resize_shadow_controller.h" |
#include "ash/wm/window_state.h" |
@@ -467,16 +468,24 @@ |
window_state->GetRestoreBoundsInScreen().ToString()); |
} |
-// Tests that a gesture cannot minimize an unminimizeable window. |
-TEST_F(ToplevelWindowEventHandlerTest, |
- GestureAttemptMinimizeUnminimizeableWindow) { |
+// Tests that a gesture cannot minimize a window in login/lock screen. |
+TEST_F(ToplevelWindowEventHandlerTest, GestureDragMinimizeLoginScreen) { |
+ LockStateController* state_controller = |
+ Shell::GetInstance()->lock_state_controller(); |
+ state_controller->OnLoginStateChanged(user::LOGGED_IN_NONE); |
+ state_controller->OnLockStateChanged(false); |
+ SetUserLoggedIn(false); |
+ |
scoped_ptr<aura::Window> target(CreateWindow(HTCAPTION)); |
+ aura::Window* lock = |
+ RootWindowController::ForWindow(target.get()) |
+ ->GetContainer(kShellWindowId_LockSystemModalContainer); |
+ lock->AddChild(target.get()); |
ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), |
target.get()); |
gfx::Rect old_bounds = target->bounds(); |
gfx::Point location(5, 5); |
target->SetProperty(aura::client::kCanMaximizeKey, true); |
- target->SetProperty(aura::client::kCanMinimizeKey, false); |
gfx::Point end = location; |
end.Offset(0, 100); |