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

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

Issue 68033003: Undocks window first before side-snapping bounds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undocks window first before side-snapping bounds (comments) Created 7 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/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 c049103ff3df74d401da863e91885afb84136fb5..6d6577608bc029501c5cac785d211284791f37df 100644
--- a/ash/wm/workspace/workspace_window_resizer_unittest.cc
+++ b/ash/wm/workspace/workspace_window_resizer_unittest.cc
@@ -637,6 +637,8 @@ TEST_F(WorkspaceWindowResizerTest, Edge) {
// Test if the restore bounds is correct in multiple displays.
window_state->ClearRestoreBounds();
+ // Restore to clear snapped state.
+ window_state->Restore();
if (!SupportsMultipleDisplays())
return;
@@ -783,8 +785,9 @@ TEST_F(WorkspaceWindowResizerTest, DontDragOffBottomWithMultiDisplay) {
window_->SetBounds(gfx::Rect(100, 200, 300, 20));
DCHECK_LT(window_->bounds().height(),
WorkspaceWindowResizer::kMinOnscreenHeight);
+ // Drag down avoiding dragging along the edge as that would side-snap.
scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTCAPTION));
+ window_.get(), gfx::Point(10, 0), HTCAPTION));
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, 0, 400), 0);
int expected_y = kRootHeight - window_->bounds().height() - 10;
@@ -802,8 +805,9 @@ TEST_F(WorkspaceWindowResizerTest, DontDragOffBottomWithMultiDisplay) {
{
window_->SetBounds(gfx::Rect(100, 200, 300, 400));
scoped_ptr<WindowResizer> resizer(CreateResizerForTest(
- window_.get(), gfx::Point(), HTCAPTION));
+ window_.get(), gfx::Point(10, 0), HTCAPTION));
ASSERT_TRUE(resizer.get());
+ // Drag down avoiding dragging along the edge as that would side-snap.
resizer->Drag(CalculateDragPoint(*resizer, 0, 400), 0);
int expected_y =
kRootHeight - WorkspaceWindowResizer::kMinOnscreenHeight - 10;
« ash/wm/workspace/workspace_window_resizer.cc ('K') | « ash/wm/workspace/workspace_window_resizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698