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

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

Issue 2792773002: Fullscreen backdrop window for maximize mode (Closed)
Patch Set: updated the test Created 3 years, 9 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/workspace/workspace_layout_manager_backdrop_delegate.h ('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 1c9edfd495e6f014c3aacdb6841d106a69339860..4cb980652cc509af3075c33f6a66cf1661babb09 100644
--- a/ash/common/wm/workspace/workspace_layout_manager_unittest.cc
+++ b/ash/common/wm/workspace/workspace_layout_manager_unittest.cc
@@ -1098,31 +1098,33 @@ TEST_F(WorkspaceLayoutManagerBackdropTest, VerifyBackdropAndItsStacking) {
EXPECT_EQ("b", GetWindowOrderAsString(nullptr, window1, window2, window3));
}
-// Tests that when hidding the shelf, that the backdrop resizes to fill the
-// entire workspace area.
-TEST_F(WorkspaceLayoutManagerBackdropTest, ShelfVisibilityChangesBounds) {
+// Tests that when hidding the shelf, that the backdrop stays fullscreen.
+TEST_F(WorkspaceLayoutManagerBackdropTest,
+ ShelfVisibilityDoesNotChangesBounds) {
WmShelf* shelf = GetPrimaryShelf();
ShelfLayoutManager* shelf_layout_manager = shelf->shelf_layout_manager();
ShowTopWindowBackdrop(true);
RunAllPendingInMessageLoop();
+ const gfx::Size fullscreen_size =
+ display::Screen::GetScreen()->GetPrimaryDisplay().size();
ASSERT_EQ(SHELF_VISIBLE, shelf_layout_manager->visibility_state());
- gfx::Rect initial_bounds = default_container()->GetChildren()[0]->GetBounds();
+ EXPECT_EQ(fullscreen_size,
+ default_container()->GetChildren()[0]->GetBounds().size());
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN);
shelf_layout_manager->UpdateVisibilityState();
- // When the shelf is re-shown WorkspaceLayoutManager shrinks all children
- // including the backdrop.
+ // When the shelf is re-shown WorkspaceLayoutManager shrinks all children but
+ // the backdrop.
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
shelf_layout_manager->UpdateVisibilityState();
- gfx::Rect reduced_bounds = default_container()->GetChildren()[0]->GetBounds();
- EXPECT_LT(reduced_bounds.height(), initial_bounds.height());
+ EXPECT_EQ(fullscreen_size,
+ default_container()->GetChildren()[0]->GetBounds().size());
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN);
shelf_layout_manager->UpdateVisibilityState();
-
- EXPECT_GT(default_container()->GetChildren()[0]->GetBounds().height(),
- reduced_bounds.height());
+ EXPECT_EQ(fullscreen_size,
+ default_container()->GetChildren()[0]->GetBounds().size());
}
class WorkspaceLayoutManagerKeyboardTest : public AshTest {
« no previous file with comments | « ash/common/wm/workspace/workspace_layout_manager_backdrop_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698