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

Unified Diff: ash/wm/workspace/workspace_window_resizer_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
Index: ash/wm/workspace/workspace_window_resizer_unittest.cc
diff --git a/ash/wm/workspace/workspace_window_resizer_unittest.cc b/ash/wm/workspace/workspace_window_resizer_unittest.cc
index 834a15c436d43572073ae73a1127ec5e7efa18d3..0279ae0c7087df3f068032e8719183d796dca6d3 100644
--- a/ash/wm/workspace/workspace_window_resizer_unittest.cc
+++ b/ash/wm/workspace/workspace_window_resizer_unittest.cc
@@ -6,6 +6,7 @@
#include "ash/display/display_controller.h"
#include "ash/display/mouse_cursor_event_filter.h"
+#include "ash/root_window_controller.h"
#include "ash/screen_ash.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
@@ -126,6 +127,10 @@ class WorkspaceWindowResizerTest : public test::AshTestBase {
return std::vector<aura::Window*>();
}
+ internal::ShelfLayoutManager* shelf_layout_manager() {
+ return Shell::GetPrimaryRootWindowController()->shelf();
+ }
+
TestWindowDelegate delegate_;
TestWindowDelegate delegate2_;
TestWindowDelegate delegate3_;
@@ -485,7 +490,7 @@ TEST_F(WorkspaceWindowResizerTest, MAYBE_WindowDragWithMultiDisplays) {
// The secondary display is logically on the right, but on the system (e.g. X)
// layer, it's below the primary one. See UpdateDisplay() in ash_test_base.cc.
UpdateDisplay("800x600,800x600");
- Shell::GetInstance()->shelf()->LayoutShelf();
+ shelf_layout_manager()->LayoutShelf();
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
ASSERT_EQ(2U, root_windows.size());
@@ -546,7 +551,7 @@ TEST_F(WorkspaceWindowResizerTest, MAYBE_WindowDragWithMultiDisplays) {
TEST_F(WorkspaceWindowResizerTest,
MAYBE_WindowDragWithMultiDisplaysRightToLeft) {
UpdateDisplay("800x600,800x600");
- Shell::GetInstance()->shelf()->LayoutShelf();
+ shelf_layout_manager()->LayoutShelf();
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
ASSERT_EQ(2U, root_windows.size());
@@ -1004,7 +1009,7 @@ TEST_F(WorkspaceWindowResizerTest, TestProperSizerResolutions) {
scoped_ptr<SnapSizer> resizer(new SnapSizer(
window_.get(), gfx::Point(), SnapSizer::LEFT_EDGE));
ASSERT_TRUE(resizer.get());
- Shell::GetInstance()->shelf()->SetAutoHideBehavior(
+ shelf_layout_manager()->SetAutoHideBehavior(
SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
gfx::Rect rect = resizer->GetTargetBoundsForSize(0);
EXPECT_EQ("0,0 720x597", rect.ToString());
@@ -1014,7 +1019,7 @@ TEST_F(WorkspaceWindowResizerTest, TestProperSizerResolutions) {
EXPECT_EQ("0,0 720x597", rect.ToString());
rect = resizer->GetTargetBoundsForSize(3);
EXPECT_EQ("0,0 640x597", rect.ToString());
- Shell::GetInstance()->shelf()->SetAutoHideBehavior(
+ shelf_layout_manager()->SetAutoHideBehavior(
SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
rect = resizer->GetTargetBoundsForSize(0);
EXPECT_EQ("0,0 720x552", rect.ToString());
@@ -1090,7 +1095,7 @@ TEST_F(WorkspaceWindowResizerTest, MAYBE_CursorDeviceScaleFactor) {
// The secondary display is logically on the right, but on the system (e.g. X)
// layer, it's below the primary one. See UpdateDisplay() in ash_test_base.cc.
UpdateDisplay("400x400,800x800*2");
- Shell::GetInstance()->shelf()->LayoutShelf();
+ shelf_layout_manager()->LayoutShelf();
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
ASSERT_EQ(2U, root_windows.size());
« no previous file with comments | « ash/wm/workspace/workspace_manager2_unittest.cc ('k') | chrome/browser/chromeos/system/ash_system_tray_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698