Chromium Code Reviews| Index: ash/wm/panels/panel_window_resizer_unittest.cc |
| diff --git a/ash/wm/panels/panel_window_resizer_unittest.cc b/ash/wm/panels/panel_window_resizer_unittest.cc |
| index 42abd7d792a86ba1e84d75540016500cf8c61fbb..a8422f68a5b61d1e14132f620dd4f0d69cdb8244 100644 |
| --- a/ash/wm/panels/panel_window_resizer_unittest.cc |
| +++ b/ash/wm/panels/panel_window_resizer_unittest.cc |
| @@ -273,6 +273,36 @@ TEST_F(PanelWindowResizerTest, PanelDetachReattachTop) { |
| DetachReattachTest(window.get(), 0, 1); |
| } |
|
Mr4D (OOO till 08-26)
2014/09/18 23:39:00
Could you please add a comment for this test? You
flackr
2014/09/19 14:17:06
Done.
|
| +TEST_F(PanelWindowResizerTest, DetachThenHideShelf) { |
| + if (!SupportsHostWindowResize()) |
| + return; |
| + scoped_ptr<aura::Window> window( |
| + CreatePanelWindow(gfx::Point(0, 0))); |
| + wm::WindowState* state = wm::GetWindowState(window.get()); |
| + gfx::Rect expected_bounds = window->GetBoundsInScreen(); |
| + expected_bounds.set_y(expected_bounds.y() - 100); |
| + DragStart(window.get()); |
| + DragMove(0, -100); |
| + EXPECT_FALSE(state->IsMinimized()); |
| + |
| + // Hide the shelf. This minimizes all attached windows but should ignore |
| + // the dragged window. |
| + ShelfLayoutManager* shelf = RootWindowController::ForWindow(window.get())-> |
| + shelf()->shelf_layout_manager(); |
| + shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN); |
| + shelf->UpdateVisibilityState(); |
| + RunAllPendingInMessageLoop(); |
| + EXPECT_FALSE(state->IsMinimized()); |
| + EXPECT_EQ(kShellWindowId_PanelContainer, window->parent()->id()); |
| + DragEnd(); |
| + |
| + // When the drag ends the window should be detached and where it was dragged |
| + // to. |
|
Mr4D (OOO till 08-26)
2014/09/18 23:39:00
This sentence is odd.
When the drag ends, the win
flackr
2014/09/19 14:17:06
Done.
|
| + EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); |
| + EXPECT_FALSE(state->IsMinimized()); |
| + EXPECT_EQ(expected_bounds.ToString(), window->GetBoundsInScreen().ToString()); |
| +} |
| + |
| TEST_F(PanelWindowResizerTest, PanelDetachReattachMultipleDisplays) { |
| if (!SupportsMultipleDisplays()) |
| return; |