Index: ash/shell_unittest.cc |
diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc |
index 131d500c8d0fdcfccf5f231be1fab00ad71fd899..d939cdb9f0a950a82e643104e92f82edd5d7a4c3 100644 |
--- a/ash/shell_unittest.cc |
+++ b/ash/shell_unittest.cc |
@@ -10,6 +10,7 @@ |
#include "ash/ash_switches.h" |
#include "ash/desktop_background/desktop_background_widget_controller.h" |
#include "ash/launcher/launcher.h" |
+#include "ash/root_window_controller.h" |
#include "ash/shell_delegate.h" |
#include "ash/shell_window_ids.h" |
#include "ash/test/ash_test_base.h" |
@@ -277,7 +278,7 @@ TEST_F(ShellTest, MAYBE_ManagedWindowModeBasics) { |
// We start with the usual window containers. |
ExpectAllContainers(); |
// Launcher is visible. |
- views::Widget* launcher_widget = shell->launcher()->widget(); |
+ views::Widget* launcher_widget = Launcher::ForPrimaryDisplay()->widget(); |
EXPECT_TRUE(launcher_widget->IsVisible()); |
// Launcher is at bottom-left of screen. |
EXPECT_EQ(0, launcher_widget->GetWindowBoundsInScreen().x()); |
@@ -316,18 +317,21 @@ TEST_F(ShellTest, FullscreenWindowHidesShelf) { |
EXPECT_FALSE(widget->IsMaximized()); |
// Shelf defaults to visible. |
- EXPECT_EQ(internal::ShelfLayoutManager::VISIBLE, |
- Shell::GetInstance()->shelf()->visibility_state()); |
+ EXPECT_EQ( |
+ internal::ShelfLayoutManager::VISIBLE, |
+ Shell::GetPrimaryRootWindowController()->shelf()->visibility_state()); |
// Fullscreen window hides it. |
widget->SetFullscreen(true); |
- EXPECT_EQ(internal::ShelfLayoutManager::HIDDEN, |
- Shell::GetInstance()->shelf()->visibility_state()); |
+ EXPECT_EQ( |
+ internal::ShelfLayoutManager::HIDDEN, |
+ Shell::GetPrimaryRootWindowController()->shelf()->visibility_state()); |
// Restoring the window restores it. |
widget->Restore(); |
- EXPECT_EQ(internal::ShelfLayoutManager::VISIBLE, |
- Shell::GetInstance()->shelf()->visibility_state()); |
+ EXPECT_EQ( |
+ internal::ShelfLayoutManager::VISIBLE, |
+ Shell::GetPrimaryRootWindowController()->shelf()->visibility_state()); |
// Clean up. |
widget->Close(); |