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

Unified Diff: ash/wm/toplevel_window_event_handler_unittest.cc

Issue 623613004: Revert of Make WindowState::CanMinimize() take into account WidgetDelegate::CanMinimize() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « ash/wm/system_gesture_event_filter_unittest.cc ('k') | ash/wm/window_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « ash/wm/system_gesture_event_filter_unittest.cc ('k') | ash/wm/window_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698