Index: ash/wm/shelf_layout_manager_unittest.cc |
diff --git a/ash/wm/shelf_layout_manager_unittest.cc b/ash/wm/shelf_layout_manager_unittest.cc |
index 4428c5d548973b09668fe80be503a71f87265b61..883e622b5b390e72b8c44245513d421d2d6f3942 100644 |
--- a/ash/wm/shelf_layout_manager_unittest.cc |
+++ b/ash/wm/shelf_layout_manager_unittest.cc |
@@ -218,9 +218,11 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_SetVisible) { |
// Make sure the bounds of the two widgets changed. |
EXPECT_GE(shelf->launcher_widget()->GetNativeView()->bounds().y(), |
- gfx::Screen::GetPrimaryDisplay().bounds().bottom()); |
+ gfx::Screen::GetPrimaryDisplay( |
+ ash::Shell::GetRootNativeView()).bounds().bottom()); |
EXPECT_GE(shelf->status()->GetNativeView()->bounds().y(), |
- gfx::Screen::GetPrimaryDisplay().bounds().bottom()); |
+ gfx::Screen::GetPrimaryDisplay( |
+ ash::Shell::GetRootNativeView()).bounds().bottom()); |
// And show it again. |
SetState(shelf, ShelfLayoutManager::VISIBLE); |
@@ -233,8 +235,8 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_SetVisible) { |
// Make sure the bounds of the two widgets changed. |
launcher_bounds = shelf->launcher_widget()->GetNativeView()->bounds(); |
- int bottom = gfx::Screen::GetPrimaryDisplay().bounds().bottom() - |
- shelf_height; |
+ int bottom = gfx::Screen::GetPrimaryDisplay( |
+ ash::Shell::GetRootNativeView()).bounds().bottom() - shelf_height; |
EXPECT_EQ(launcher_bounds.y(), |
bottom + (shelf->GetIdealBounds().height() - |
launcher_bounds.height()) / 2); |
@@ -263,9 +265,11 @@ TEST_F(ShelfLayoutManagerTest, LayoutShelfWhileAnimating) { |
// Make sure the bounds of the two widgets changed. |
EXPECT_GE(shelf->launcher_widget()->GetNativeView()->bounds().y(), |
- gfx::Screen::GetPrimaryDisplay().bounds().bottom()); |
+ gfx::Screen::GetPrimaryDisplay( |
+ ash::Shell::GetRootNativeView()).bounds().bottom()); |
EXPECT_GE(shelf->status()->GetNativeView()->bounds().y(), |
- gfx::Screen::GetPrimaryDisplay().bounds().bottom()); |
+ gfx::Screen::GetPrimaryDisplay( |
+ ash::Shell::GetRootNativeView()).bounds().bottom()); |
} |
// Makes sure the launcher is initially sized correctly. |