Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3524)

Unified Diff: ash/shell_unittest.cc

Issue 11017079: Remove Shell::shelf()|status_area_widget()|launcher() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell/window_watcher.cc ('k') | ash/system/ime/tray_ime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « ash/shell/window_watcher.cc ('k') | ash/system/ime/tray_ime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698