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

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: review comments 3 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 bd6af5dec9270e4f49064903922ccc030fe0cf1c..0b5a248f7ff33a7b31fcd455299ea5a6a94a62ea 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(),
« no previous file with comments | « ash/wm/panels/panel_window_resizer_unittest.cc ('k') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698