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

Unified Diff: ash/wm/dock/docked_window_resizer_unittest.cc

Issue 19054013: Implement automatic layout and stacking for docked windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_233331_sized
Patch Set: Implement automatic layout and stacking (test on win_aura) Created 7 years, 5 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/dock/docked_window_layout_manager_unittest.cc ('k') | ash/wm/panels/panel_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/dock/docked_window_resizer_unittest.cc
diff --git a/ash/wm/dock/docked_window_resizer_unittest.cc b/ash/wm/dock/docked_window_resizer_unittest.cc
index 7e1ea23a56abc525e4a859c77bb9d8450be08105..0a5aa0af945db63a569ad5b715b5f37b66bd88c3 100644
--- a/ash/wm/dock/docked_window_resizer_unittest.cc
+++ b/ash/wm/dock/docked_window_resizer_unittest.cc
@@ -224,8 +224,9 @@ class DockedWindowResizerTest
DragEnd();
// x-coordinate can get adjusted by snapping or sticking.
- // y-coordinate should not change by possible docking.
- EXPECT_EQ(initial_bounds.y() + dy, window->GetBoundsInScreen().y());
+ // y-coordinate could be changed by possible automatic layout if docked.
+ if (window->parent()->id() != internal::kShellWindowId_DockedContainer)
+ EXPECT_EQ(initial_bounds.y() + dy, window->GetBoundsInScreen().y());
}
bool test_panels() const {
@@ -454,9 +455,10 @@ TEST_P(DockedWindowResizerTest, AttachTwoWindows)
w2->GetBoundsInScreen().right());
EXPECT_EQ(internal::kShellWindowId_DockedContainer, w2->parent()->id());
- // Detach by dragging left (should get undocked)
+ // Detach by dragging left (should get undocked).
ASSERT_NO_FATAL_FAILURE(DragStart(w2.get()));
- DragMove(-32, -10);
+ // Drag up as well to avoid attaching panels to launcher shelf.
+ DragMove(-32, -100);
// Release the mouse and the window should be no longer attached to the edge.
DragEnd();
@@ -651,7 +653,8 @@ TEST_P(DockedWindowResizerTest, AttachTwoWindowsDetachOne)
w2.get(),
w2->bounds().width()/2 + 10,
0));
- DragMove(-(w2->bounds().width()/2 + 20), 10);
+ // Drag up as well to avoid attaching panels to launcher shelf.
+ DragMove(-(w2->bounds().width()/2 + 20), -100);
// Release the mouse and the window should be no longer attached to the edge.
DragEnd();
@@ -985,7 +988,8 @@ TEST_P(DockedWindowResizerTest, ResizeTwoWindows)
// Undock the second window. Docked area should shrink to its minimum size.
ASSERT_NO_FATAL_FAILURE(DragStart(w2.get()));
- DragMove(-40, 10);
+ // Drag up as well to avoid attaching panels to launcher shelf.
+ DragMove(-40, -100);
// Alignment set to "RIGHT" since we have another window docked.
EXPECT_EQ(DOCKED_ALIGNMENT_RIGHT, manager->alignment_);
// Release the mouse and the window should be no longer attached to the edge.
« no previous file with comments | « ash/wm/dock/docked_window_layout_manager_unittest.cc ('k') | ash/wm/panels/panel_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698