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

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

Issue 2017413002: ash: Fix variable names and setters in ShelfLayoutManager and tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shellshelf
Patch Set: rebase Created 4 years, 7 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
Index: ash/wm/workspace/workspace_layout_manager_unittest.cc
diff --git a/ash/wm/workspace/workspace_layout_manager_unittest.cc b/ash/wm/workspace/workspace_layout_manager_unittest.cc
index 89603f0f60295e17a29a570e878b74dab13c317d..17f61a2b50f6468b7d61f92e4654def98b789c03 100644
--- a/ash/wm/workspace/workspace_layout_manager_unittest.cc
+++ b/ash/wm/workspace/workspace_layout_manager_unittest.cc
@@ -797,9 +797,8 @@ TEST_F(WorkspaceLayoutManagerSoloTest, NotResizeWhenScreenIsLocked) {
window->SetProperty(aura::client::kAlwaysOnTopKey, true);
window->Show();
- ShelfLayoutManager* shelf_layout_manager =
- Shelf::ForWindow(window.get())->shelf_layout_manager();
- shelf_layout_manager->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
+ Shelf* shelf = Shelf::ForWindow(window.get());
+ shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
window->SetBounds(ScreenUtil::GetMaximizedWindowBoundsInParent(window.get()));
gfx::Rect window_bounds = window->bounds();
@@ -809,6 +808,7 @@ TEST_F(WorkspaceLayoutManagerSoloTest, NotResizeWhenScreenIsLocked) {
// The window size should not get touched while we are in lock screen.
Shell::GetInstance()->session_state_delegate()->LockScreen();
+ ShelfLayoutManager* shelf_layout_manager = shelf->shelf_layout_manager();
shelf_layout_manager->UpdateVisibilityState();
EXPECT_EQ(window_bounds.ToString(), window->bounds().ToString());
@@ -998,24 +998,24 @@ TEST_F(WorkspaceLayoutManagerBackdropTest, VerifyBackdropAndItsStacking) {
// Tests that when hidding the shelf, that the backdrop resizes to fill the
// entire workspace area.
TEST_F(WorkspaceLayoutManagerBackdropTest, ShelfVisibilityChangesBounds) {
- ShelfLayoutManager* shelf_layout_manager =
- Shelf::ForPrimaryDisplay()->shelf_layout_manager();
+ Shelf* shelf = Shelf::ForPrimaryDisplay();
+ ShelfLayoutManager* shelf_layout_manager = shelf->shelf_layout_manager();
ShowTopWindowBackdrop(true);
RunAllPendingInMessageLoop();
ASSERT_EQ(SHELF_VISIBLE, shelf_layout_manager->visibility_state());
gfx::Rect initial_bounds = default_container()->children()[0]->bounds();
- shelf_layout_manager->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN);
+ shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN);
shelf_layout_manager->UpdateVisibilityState();
// When the shelf is re-shown WorkspaceLayoutManager shrinks all children
// including the backdrop.
- shelf_layout_manager->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
+ shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
shelf_layout_manager->UpdateVisibilityState();
gfx::Rect reduced_bounds = default_container()->children()[0]->bounds();
EXPECT_LT(reduced_bounds.height(), initial_bounds.height());
- shelf_layout_manager->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN);
+ shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN);
shelf_layout_manager->UpdateVisibilityState();
EXPECT_GT(default_container()->children()[0]->bounds().height(),

Powered by Google App Engine
This is Rietveld 408576698