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

Unified Diff: ash/launcher/launcher_tooltip_manager_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/launcher/launcher.cc ('k') | ash/launcher/launcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/launcher/launcher_tooltip_manager_unittest.cc
diff --git a/ash/launcher/launcher_tooltip_manager_unittest.cc b/ash/launcher/launcher_tooltip_manager_unittest.cc
index 17f72da09b76f2bdaa0a1e47d89c6395c4d424e3..8d63320ae6b92445d401a3f78e1146dc1af5c6dc 100644
--- a/ash/launcher/launcher_tooltip_manager_unittest.cc
+++ b/ash/launcher/launcher_tooltip_manager_unittest.cc
@@ -4,6 +4,8 @@
#include "ash/launcher/launcher_tooltip_manager.h"
+#include "ash/root_window_controller.h"
+#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
#include "ash/wm/shelf_layout_manager.h"
#include "ash/wm/window_util.h"
@@ -26,11 +28,12 @@ class LauncherTooltipManagerTest : public AshTestBase {
virtual void SetUp() OVERRIDE {
AshTestBase::SetUp();
-
+ internal::RootWindowController* controller =
+ Shell::GetPrimaryRootWindowController();
tooltip_manager_.reset(new internal::LauncherTooltipManager(
SHELF_ALIGNMENT_BOTTOM,
- Shell::GetInstance()->shelf(),
- Shell::GetInstance()->launcher()->GetLauncherViewForTest()));
+ controller->shelf(),
+ controller->launcher()->GetLauncherViewForTest()));
}
virtual void TearDown() OVERRIDE {
@@ -96,8 +99,9 @@ TEST_F(LauncherTooltipManagerTest, HideWhenShelfIsHidden) {
widget->Show();
// Once the shelf is hidden, the tooltip should be invisible.
- ASSERT_EQ(internal::ShelfLayoutManager::HIDDEN,
- Shell::GetInstance()->shelf()->visibility_state());
+ ASSERT_EQ(
+ internal::ShelfLayoutManager::HIDDEN,
+ Shell::GetPrimaryRootWindowController()->shelf()->visibility_state());
EXPECT_FALSE(TooltipIsVisible());
// Do not show the view if the shelf is hidden.
@@ -113,7 +117,8 @@ TEST_F(LauncherTooltipManagerTest, HideWhenShelfIsAutoHide) {
ShowImmediately();
ASSERT_TRUE(TooltipIsVisible());
- internal::ShelfLayoutManager* shelf = Shell::GetInstance()->shelf();
+ internal::ShelfLayoutManager* shelf =
+ Shell::GetPrimaryRootWindowController()->shelf();
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
shelf->UpdateAutoHideState();
ASSERT_EQ(internal::ShelfLayoutManager::AUTO_HIDE_HIDDEN,
« no previous file with comments | « ash/launcher/launcher.cc ('k') | ash/launcher/launcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698