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

Unified Diff: ash/wm/workspace/workspace_window_resizer_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: Addressed 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
« no previous file with comments | « ash/wm/workspace/workspace_window_resizer.cc ('k') | ui/aura/client/aura_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_window_resizer_unittest.cc
diff --git a/ash/wm/workspace/workspace_window_resizer_unittest.cc b/ash/wm/workspace/workspace_window_resizer_unittest.cc
index 7de57dd0bdec64a505264dfe5ef14c3dd4c871fd..47b3c08f282a2bcf830b20a530e83102a4f5b014 100644
--- a/ash/wm/workspace/workspace_window_resizer_unittest.cc
+++ b/ash/wm/workspace/workspace_window_resizer_unittest.cc
@@ -21,6 +21,7 @@
#include "ash/wm/workspace/phantom_window_controller.h"
#include "base/string_number_conversions.h"
#include "base/stringprintf.h"
+#include "ui/aura/client/aura_constants.h"
#include "ui/aura/root_window.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/base/hit_test.h"
@@ -517,6 +518,19 @@ TEST_F(WorkspaceWindowResizerTest, Edge) {
#endif
}
+// Check that non resizable windows will not get resized.
+TEST_F(WorkspaceWindowResizerTest, NonResizableWindows) {
+ window_->SetBounds(gfx::Rect(20, 30, 50, 60));
+ window_->SetProperty(aura::client::kCanResizeKey, false);
+
+ scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
+ window_.get(), gfx::Point(), HTCAPTION, empty_windows()));
+ ASSERT_TRUE(resizer.get());
+ resizer->Drag(CalculateDragPoint(*resizer, -20, 0), 0);
+ resizer->CompleteDrag(0);
+ EXPECT_EQ("0,30 50x60", window_->bounds().ToString());
+}
+
// Verifies a window can be moved from the primary display to another.
TEST_F(WorkspaceWindowResizerTest, MAYBE_WindowDragWithMultiDisplays) {
// The secondary display is logically on the right, but on the system (e.g. X)
« no previous file with comments | « ash/wm/workspace/workspace_window_resizer.cc ('k') | ui/aura/client/aura_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698