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

Unified Diff: ash/wm/workspace/multi_window_resize_controller_unittest.cc

Issue 11363177: Don't use drag to corner resizing for unresizable windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added more cases and unit tests Created 8 years, 1 month 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/wm/workspace/multi_window_resize_controller_unittest.cc
diff --git a/ash/wm/workspace/multi_window_resize_controller_unittest.cc b/ash/wm/workspace/multi_window_resize_controller_unittest.cc
index e528438c54ecb1882d7f80093bef04eabdce9ed1..96ea0cd0648fbf2ca459a4c3073b10964ceb6c4d 100644
--- a/ash/wm/workspace/multi_window_resize_controller_unittest.cc
+++ b/ash/wm/workspace/multi_window_resize_controller_unittest.cc
@@ -10,6 +10,7 @@
#include "ash/wm/workspace_controller.h"
#include "ash/wm/workspace_controller_test_helper.h"
#include "ash/wm/workspace/workspace_event_handler_test_helper.h"
+#include "ui/aura/client/aura_constants.h"
#include "ui/aura/test/event_generator.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/window.h"
@@ -126,6 +127,24 @@ TEST_F(MultiWindowResizeControllerTest, BasicTests) {
EXPECT_FALSE(HasPendingHide());
}
+// Make sure that a non resizable window has no impact.
+TEST_F(MultiWindowResizeControllerTest, NonResizableTest) {
+ aura::test::TestWindowDelegate delegate1;
+ scoped_ptr<aura::Window> w1(
+ CreateTestWindow(&delegate1, gfx::Rect(0, 0, 100, 100)));
+ delegate1.set_window_component(HTRIGHT);
+ aura::test::TestWindowDelegate delegate2;
+ scoped_ptr<aura::Window> w2(
+ CreateTestWindow(&delegate2, gfx::Rect(100, 0, 100, 100)));
+ delegate2.set_window_component(HTRIGHT);
+ w2->SetProperty(aura::client::kCanResizeKey, false);
+ aura::test::EventGenerator generator(w1->GetRootWindow());
+ generator.MoveMouseTo(99, 50);
+ EXPECT_FALSE(HasPendingShow());
+ EXPECT_FALSE(IsShowing());
+ EXPECT_FALSE(HasPendingHide());
+}
+
// Makes sure deleting a window hides.
TEST_F(MultiWindowResizeControllerTest, DeleteWindow) {
aura::test::TestWindowDelegate delegate1;

Powered by Google App Engine
This is Rietveld 408576698