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

Unified Diff: ash/common/wm/workspace/workspace_layout_manager_unittest.cc

Issue 2593953002: ash: Fix status bubble is vertically offset after switching desktops (Closed)
Patch Set: add test coverage Created 3 years, 11 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/common/wm/default_state.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/workspace/workspace_layout_manager_unittest.cc
diff --git a/ash/common/wm/workspace/workspace_layout_manager_unittest.cc b/ash/common/wm/workspace/workspace_layout_manager_unittest.cc
index 6bf4acbfe82925e9df78482575cd8c766112657a..df850df80c891d012f7666c7642a8e9e0a38e232 100644
--- a/ash/common/wm/workspace/workspace_layout_manager_unittest.cc
+++ b/ash/common/wm/workspace/workspace_layout_manager_unittest.cc
@@ -576,6 +576,29 @@ TEST_F(WorkspaceLayoutManagerTest,
EXPECT_EQ(expected_bounds.ToString(), window->GetBounds().ToString());
}
+// Do not adjust window bounds to ensure minimum visibility for transient
+// windows (crbug.com/624806).
+TEST_F(WorkspaceLayoutManagerTest,
+ DoNotAdjustTransientWindowBoundsToEnsureMinimumVisibility) {
+ UpdateDisplay("300x400");
+ WindowOwner window_owner(WmShell::Get()->NewWindow(ui::wm::WINDOW_TYPE_NORMAL,
+ ui::LAYER_TEXTURED));
+ WmWindow* window = window_owner.window();
+ window->SetBounds(gfx::Rect(10, 0, 100, 200));
+ ParentWindowInPrimaryRootWindow(window);
+ window->Show();
+
+ std::unique_ptr<WindowOwner> window2_owner(
+ CreateTestWindow(gfx::Rect(10, 0, 40, 20)));
+ WmWindow* window2 = window2_owner->window();
+ AddTransientChild(window, window2);
+ window2->Show();
+
+ gfx::Rect expected_bounds = window2->GetBounds();
+ WmShell::Get()->SetDisplayWorkAreaInsets(window, gfx::Insets(50, 0, 0, 0));
+ EXPECT_EQ(expected_bounds.ToString(), window2->GetBounds().ToString());
+}
+
// Following "Solo" tests were originally written for BaseLayoutManager.
using WorkspaceLayoutManagerSoloTest = AshTest;
« no previous file with comments | « ash/common/wm/default_state.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698