Index: ash/wm/dock/docked_window_resizer_unittest.cc |
diff --git a/ash/wm/dock/docked_window_resizer_unittest.cc b/ash/wm/dock/docked_window_resizer_unittest.cc |
index 4406fd40b7f6fb7098d37d0d78796d5a098ae92d..cbb86b3329700ddd85e0d87c59f38e55843033fb 100644 |
--- a/ash/wm/dock/docked_window_resizer_unittest.cc |
+++ b/ash/wm/dock/docked_window_resizer_unittest.cc |
@@ -6,9 +6,9 @@ |
#include "ash/aura/wm_window_aura.h" |
#include "ash/common/ash_switches.h" |
-#include "ash/common/shelf/shelf.h" |
#include "ash/common/shelf/shelf_types.h" |
#include "ash/common/shelf/shelf_widget.h" |
+#include "ash/common/shelf/wm_shelf.h" |
#include "ash/common/shell_window_ids.h" |
#include "ash/common/wm/dock/docked_window_layout_manager.h" |
#include "ash/common/wm/panels/panel_layout_manager.h" |
@@ -361,21 +361,21 @@ TEST_P(DockedWindowResizerTest, AttachRightChangeShelf) { |
EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); |
// set launcher shelf to be aligned on the right |
- Shelf::ForPrimaryDisplay()->SetAlignment(SHELF_ALIGNMENT_RIGHT); |
+ GetPrimaryShelf()->SetAlignment(SHELF_ALIGNMENT_RIGHT); |
// The window should have moved and get attached to the left dock. |
EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().x(), |
window->GetBoundsInScreen().x()); |
EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); |
// set launcher shelf to be aligned on the left |
- Shelf::ForPrimaryDisplay()->SetAlignment(SHELF_ALIGNMENT_LEFT); |
+ GetPrimaryShelf()->SetAlignment(SHELF_ALIGNMENT_LEFT); |
// The window should have moved and get attached to the right edge. |
EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(), |
window->GetBoundsInScreen().right()); |
EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id()); |
// set launcher shelf to be aligned at the bottom |
- Shelf::ForPrimaryDisplay()->SetAlignment(SHELF_ALIGNMENT_BOTTOM); |
+ GetPrimaryShelf()->SetAlignment(SHELF_ALIGNMENT_BOTTOM); |
// The window should stay in the right edge. |
EXPECT_EQ(window->GetRootWindow()->GetBoundsInScreen().right(), |
window->GetBoundsInScreen().right()); |
@@ -595,8 +595,7 @@ TEST_P(DockedWindowResizerTest, AttachOneAutoHideShelf) { |
EXPECT_EQ(work_area.bottom(), manager->docked_bounds().bottom()); |
// Turn on shelf auto-hide. |
- Shelf::ForPrimaryDisplay()->SetAutoHideBehavior( |
- SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); |
+ GetPrimaryShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); |
work_area = display::Screen::GetScreen() |
->GetDisplayNearestWindow(w1.get()) |
.work_area(); |
@@ -1372,7 +1371,7 @@ TEST_P(DockedWindowResizerTest, DragToShelf) { |
EXPECT_EQ(DOCKED_ALIGNMENT_NONE, docked_alignment(manager)); |
// Drag down almost to shelf. A panel will snap, a regular window won't. |
- ShelfWidget* shelf = Shelf::ForPrimaryDisplay()->shelf_widget(); |
+ ShelfWidget* shelf = GetPrimaryShelf()->GetShelfWidgetForTesting(); |
const int shelf_y = shelf->GetWindowBoundsInScreen().y(); |
const int kDistanceFromShelf = 10; |
ASSERT_NO_FATAL_FAILURE(DragStart(w1.get())); |