| 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 4be464567b906f15ba5f803a969bc6b789c5f3fc..8f108d323bff2f73acc6a0df425a32bbd75a1d98 100644
|
| --- a/ash/wm/panels/panel_window_resizer_unittest.cc
|
| +++ b/ash/wm/panels/panel_window_resizer_unittest.cc
|
| @@ -103,6 +103,7 @@ class PanelWindowResizerTest : public test::AshTestBase {
|
| // dragging out by the vector (dx, dy).
|
| void DetachReattachTest(int dx, int dy) {
|
| EXPECT_TRUE(window_->GetProperty(kPanelAttachedKey));
|
| + EXPECT_EQ(internal::kShellWindowId_PanelContainer, window_->parent()->id());
|
| DragStart();
|
| gfx::Rect initial_bounds = window_->bounds();
|
|
|
| @@ -120,6 +121,8 @@ class PanelWindowResizerTest : public test::AshTestBase {
|
| // The panel should be detached when the drag completes.
|
| DragEnd();
|
| EXPECT_FALSE(window_->GetProperty(kPanelAttachedKey));
|
| + EXPECT_EQ(internal::kShellWindowId_WorkspaceContainer,
|
| + window_->parent()->id());
|
|
|
| DragStart();
|
| // Drag the panel down.
|
| @@ -131,6 +134,7 @@ class PanelWindowResizerTest : public test::AshTestBase {
|
| EXPECT_TRUE(window_->GetProperty(kPanelAttachedKey));
|
| EXPECT_EQ(initial_bounds.x(), window_->bounds().x());
|
| EXPECT_EQ(initial_bounds.y(), window_->bounds().y());
|
| + EXPECT_EQ(internal::kShellWindowId_PanelContainer, window_->parent()->id());
|
| }
|
|
|
| aura::test::TestWindowDelegate delegate_;
|
| @@ -177,5 +181,23 @@ TEST_F(PanelWindowResizerTest, PanelDetachReattachTop) {
|
| DetachReattachTest(0, 1);
|
| }
|
|
|
| +TEST_F(PanelWindowResizerTest, DragMovesToPanelLayer) {
|
| + DragStart();
|
| + DragMove(0, -100);
|
| + DragEnd();
|
| + EXPECT_EQ(internal::kShellWindowId_WorkspaceContainer,
|
| + window_->parent()->id());
|
| +
|
| + // While moving the panel window should be moved to the panel container.
|
| + DragStart();
|
| + DragMove(20, 0);
|
| + EXPECT_EQ(internal::kShellWindowId_PanelContainer, window_->parent()->id());
|
| + DragEnd();
|
| +
|
| + // When dropped it should return to the default container.
|
| + EXPECT_EQ(internal::kShellWindowId_WorkspaceContainer,
|
| + window_->parent()->id());
|
| +}
|
| +
|
| } // namespace internal
|
| } // namespace ash
|
|
|