| Index: ash/shelf/shelf_widget_unittest.cc
|
| diff --git a/ash/shelf/shelf_widget_unittest.cc b/ash/shelf/shelf_widget_unittest.cc
|
| index 403cc204a5b1d26c03429f781032ba1593f549f2..b6886959b84928e1170dd8285fd7d74d38578efd 100644
|
| --- a/ash/shelf/shelf_widget_unittest.cc
|
| +++ b/ash/shelf/shelf_widget_unittest.cc
|
| @@ -228,7 +228,8 @@ TEST_F(ShelfWidgetTest, ShelfEdgeOverlappingWindowHitTestMouse) {
|
| }
|
|
|
| // Change shelf alignment to verify that the targeter insets are updated.
|
| - shelf_layout_manager->SetAlignment(wm::SHELF_ALIGNMENT_LEFT);
|
| + Shelf* shelf = Shelf::ForPrimaryDisplay();
|
| + shelf->SetAlignment(wm::SHELF_ALIGNMENT_LEFT);
|
| shelf_layout_manager->LayoutShelf();
|
| shelf_bounds = shelf_widget->GetWindowBoundsInScreen();
|
| {
|
| @@ -243,8 +244,8 @@ TEST_F(ShelfWidgetTest, ShelfEdgeOverlappingWindowHitTestMouse) {
|
| }
|
|
|
| // Now restore shelf alignment (bottom) and auto-hide (hidden) the shelf.
|
| - shelf_layout_manager->SetAlignment(wm::SHELF_ALIGNMENT_BOTTOM);
|
| - shelf_layout_manager->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
|
| + shelf->SetAlignment(wm::SHELF_ALIGNMENT_BOTTOM);
|
| + shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
|
| shelf_layout_manager->LayoutShelf();
|
| EXPECT_EQ(SHELF_AUTO_HIDE, shelf_layout_manager->visibility_state());
|
| EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf_layout_manager->auto_hide_state());
|
| @@ -301,7 +302,8 @@ TEST_F(ShelfWidgetTest, HiddenShelfHitTestTouch) {
|
| }
|
|
|
| // Now auto-hide (hidden) the shelf.
|
| - shelf_layout_manager->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
|
| + Shelf::ForPrimaryDisplay()->SetAutoHideBehavior(
|
| + SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
|
| shelf_layout_manager->LayoutShelf();
|
| EXPECT_EQ(SHELF_AUTO_HIDE, shelf_layout_manager->visibility_state());
|
| EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf_layout_manager->auto_hide_state());
|
| @@ -416,9 +418,8 @@ class ShelfWidgetTestWithDelegate : public ShelfWidgetTest {
|
| shelf_widget->shelf_layout_manager();
|
| ASSERT_NE(nullptr, shelf_layout_manager);
|
|
|
| - EXPECT_EQ(initial_alignment, shelf_layout_manager->GetAlignment());
|
| - EXPECT_EQ(initial_auto_hide_behavior,
|
| - shelf_layout_manager->auto_hide_behavior());
|
| + EXPECT_EQ(initial_alignment, shelf->alignment());
|
| + EXPECT_EQ(initial_auto_hide_behavior, shelf->auto_hide_behavior());
|
| EXPECT_EQ(expected_shelf_visibility_state,
|
| shelf_layout_manager->visibility_state());
|
| EXPECT_EQ(expected_shelf_auto_hide_state,
|
|
|