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

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

Issue 1149153007: Ignores programmatic bounds changes for docked windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ignores programmatic bounds changes for docked windows (comments) Created 5 years, 6 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.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « ash/wm/dock/docked_window_layout_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698