Index: ash/wm/dock/docked_window_layout_manager_unittest.cc |
diff --git a/ash/wm/dock/docked_window_layout_manager_unittest.cc b/ash/wm/dock/docked_window_layout_manager_unittest.cc |
index 0346758a50ba860f7fdddba0c27a716286d7cf87..80d6b912e06a02762f2ac2c8d233db0aed0a9e1b 100644 |
--- a/ash/wm/dock/docked_window_layout_manager_unittest.cc |
+++ b/ash/wm/dock/docked_window_layout_manager_unittest.cc |
@@ -237,6 +237,23 @@ TEST_P(DockedWindowLayoutManagerTest, AddOneWindow) { |
EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); |
} |
+// Tests that a docked window's bounds cannot be changed programmatically. |
+TEST_P(DockedWindowLayoutManagerTest, DockedWindowBoundsDontChange) { |
+ if (!SupportsHostWindowResize()) |
+ return; |
+ |
+ gfx::Rect bounds(0, 0, 201, 201); |
+ scoped_ptr<aura::Window> window(CreateTestWindow(bounds)); |
+ DragRelativeToEdge(DOCKED_EDGE_RIGHT, window.get(), 0); |
+ |
+ // The window should be attached and docked at the right edge. |
+ EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); |
+ |
+ bounds = window->GetBoundsInScreen(); |
+ window->SetBounds(gfx::Rect(210, 210, 210, 210)); |
+ EXPECT_EQ(bounds.ToString(), window->GetBoundsInScreen().ToString()); |
+} |
+ |
// Tests that with a window docked on the left the auto-placing logic in |
// RearrangeVisibleWindowOnShow places windows flush with work area edges. |
TEST_P(DockedWindowLayoutManagerTest, AutoPlacingLeft) { |