Index: ash/wm/workspace/workspace_window_resizer_unittest.cc |
diff --git a/ash/wm/workspace/workspace_window_resizer_unittest.cc b/ash/wm/workspace/workspace_window_resizer_unittest.cc |
index c758f58f49d5a6f83c6c4afb08edce063d975d6e..a6d27c88cf5cb8defdc8c483f5a590555fc78c47 100644 |
--- a/ash/wm/workspace/workspace_window_resizer_unittest.cc |
+++ b/ash/wm/workspace/workspace_window_resizer_unittest.cc |
@@ -39,6 +39,10 @@ namespace { |
const int kRootHeight = 600; |
+Shelf* GetShelf() { |
+ return Shelf::ForPrimaryDisplay(); |
+} |
+ |
// A simple window delegate that returns the specified min size. |
class TestWindowDelegate : public aura::test::TestWindowDelegate { |
public: |
@@ -1003,8 +1007,7 @@ TEST_F(WorkspaceWindowResizerTest, DragWindowOutsideRightToSecondaryDisplay) { |
// Verifies snapping to edges works. |
TEST_F(WorkspaceWindowResizerTest, SnapToEdge) { |
- Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager()-> |
- SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); |
+ GetShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); |
window_->SetBounds(gfx::Rect(96, 112, 320, 160)); |
// Click 50px to the right so that the mouse pointer does not leave the |
// workspace ensuring sticky behavior. |
@@ -1759,7 +1762,7 @@ TEST_F(WorkspaceWindowResizerTest, MainWindowHonoursMinWidth) { |
// The following variants test that windows are resized correctly to the edges |
// of the screen using touch, when touch point is off of the window border. |
TEST_F(WorkspaceWindowResizerTest, TouchResizeToEdge_RIGHT) { |
- shelf_layout_manager()->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN); |
+ GetShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN); |
InitTouchResizeWindow(gfx::Rect(100, 100, 600, kRootHeight - 200), HTRIGHT); |
EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 200).ToString(), |
@@ -1793,7 +1796,7 @@ TEST_F(WorkspaceWindowResizerTest, TouchResizeToEdge_RIGHT) { |
} |
TEST_F(WorkspaceWindowResizerTest, TouchResizeToEdge_LEFT) { |
- shelf_layout_manager()->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN); |
+ GetShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN); |
InitTouchResizeWindow(gfx::Rect(100, 100, 600, kRootHeight - 200), HTLEFT); |
EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 200).ToString(), |
@@ -1827,7 +1830,7 @@ TEST_F(WorkspaceWindowResizerTest, TouchResizeToEdge_LEFT) { |
} |
TEST_F(WorkspaceWindowResizerTest, TouchResizeToEdge_TOP) { |
- shelf_layout_manager()->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN); |
+ GetShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN); |
InitTouchResizeWindow(gfx::Rect(100, 100, 600, kRootHeight - 200), HTTOP); |
EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 200).ToString(), |
@@ -1861,7 +1864,7 @@ TEST_F(WorkspaceWindowResizerTest, TouchResizeToEdge_TOP) { |
} |
TEST_F(WorkspaceWindowResizerTest, TouchResizeToEdge_BOTTOM) { |
- shelf_layout_manager()->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN); |
+ GetShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN); |
InitTouchResizeWindow(gfx::Rect(100, 100, 600, kRootHeight - 200), HTBOTTOM); |
EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 200).ToString(), |