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

Unified Diff: ash/wm/shelf_layout_manager_unittest.cc

Issue 10442017: Rename GetRootWindow() -> GetPrimaryRootWindow() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git-try -b linux_chromeos,win_aura Created 8 years, 7 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/wm/shelf_layout_manager.cc ('k') | ash/wm/system_gesture_event_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2853e98d01a5afa57df972909486e9490b4ef825..011951dccd48e56e2bbf2ad80c51ce43f911e3d5 100644
--- a/ash/wm/shelf_layout_manager_unittest.cc
+++ b/ash/wm/shelf_layout_manager_unittest.cc
@@ -93,7 +93,7 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_SetVisible) {
const aura::MonitorManager* manager =
aura::Env::GetInstance()->monitor_manager();
const gfx::Monitor& monitor =
- manager->GetMonitorNearestWindow(Shell::GetRootWindow());
+ manager->GetMonitorNearestWindow(Shell::GetPrimaryRootWindow());
ASSERT_NE(-1, monitor.id());
// Bottom inset should be the max of widget heights.
EXPECT_EQ(shelf_height,
@@ -145,7 +145,7 @@ TEST_F(ShelfLayoutManagerTest, LayoutShelfWhileAnimating) {
const aura::MonitorManager* manager =
aura::Env::GetInstance()->monitor_manager();
const gfx::Monitor& monitor =
- manager->GetMonitorNearestWindow(Shell::GetRootWindow());
+ manager->GetMonitorNearestWindow(Shell::GetPrimaryRootWindow());
// Hide the shelf.
SetState(shelf, ShelfLayoutManager::HIDDEN);
@@ -198,7 +198,7 @@ TEST_F(ShelfLayoutManagerTest, DontReferenceLauncherAfterDeletion) {
// Various assertions around auto-hide.
TEST_F(ShelfLayoutManagerTest, AutoHide) {
- aura::RootWindow* root = Shell::GetRootWindow();
+ aura::RootWindow* root = Shell::GetPrimaryRootWindow();
aura::test::EventGenerator generator(root, root);
generator.MoveMouseTo(0, 0);
@@ -262,7 +262,7 @@ TEST_F(ShelfLayoutManagerTest, VisibleWhenLockScreenShowing) {
// Since ShelfLayoutManager queries for mouse location, move the mouse so
// it isn't over the shelf.
aura::test::EventGenerator generator(
- Shell::GetInstance()->GetRootWindow(), gfx::Point());
+ Shell::GetPrimaryRootWindow(), gfx::Point());
generator.MoveMouseTo(0, 0);
ShelfLayoutManager* shelf = GetShelfLayoutManager();
@@ -276,7 +276,7 @@ TEST_F(ShelfLayoutManagerTest, VisibleWhenLockScreenShowing) {
EXPECT_EQ(ShelfLayoutManager::AUTO_HIDE, shelf->visibility_state());
EXPECT_EQ(ShelfLayoutManager::AUTO_HIDE_HIDDEN, shelf->auto_hide_state());
- aura::RootWindow* root = Shell::GetRootWindow();
+ aura::RootWindow* root = Shell::GetPrimaryRootWindow();
// LayoutShelf() forces the animation to completion, at which point the
// launcher should go off the screen.
shelf->LayoutShelf();
@@ -312,7 +312,7 @@ TEST_F(ShelfLayoutManagerTest, SetAutoHideBehavior) {
// Since ShelfLayoutManager queries for mouse location, move the mouse so
// it isn't over the shelf.
aura::test::EventGenerator generator(
- Shell::GetInstance()->GetRootWindow(), gfx::Point());
+ Shell::GetPrimaryRootWindow(), gfx::Point());
generator.MoveMouseTo(0, 0);
ShelfLayoutManager* shelf = GetShelfLayoutManager();
@@ -365,7 +365,7 @@ TEST_F(ShelfLayoutManagerTest, VisibleWhenStatusOrLauncherFocused) {
// Since ShelfLayoutManager queries for mouse location, move the mouse so
// it isn't over the shelf.
aura::test::EventGenerator generator(
- Shell::GetInstance()->GetRootWindow(), gfx::Point());
+ Shell::GetPrimaryRootWindow(), gfx::Point());
generator.MoveMouseTo(0, 0);
ShelfLayoutManager* shelf = GetShelfLayoutManager();
@@ -501,7 +501,7 @@ TEST_F(ShelfLayoutManagerTest, SetAlignment) {
const aura::MonitorManager* manager =
aura::Env::GetInstance()->monitor_manager();
gfx::Monitor monitor =
- manager->GetMonitorNearestWindow(Shell::GetRootWindow());
+ manager->GetMonitorNearestWindow(Shell::GetPrimaryRootWindow());
ASSERT_NE(-1, monitor.id());
EXPECT_EQ(shelf->GetIdealBounds().width(),
monitor.GetWorkAreaInsets().left());
@@ -524,7 +524,7 @@ TEST_F(ShelfLayoutManagerTest, SetAlignment) {
shelf->SetAlignment(SHELF_ALIGNMENT_RIGHT);
launcher_bounds = shelf->launcher_widget()->GetWindowScreenBounds();
- monitor = manager->GetMonitorNearestWindow(Shell::GetRootWindow());
+ monitor = manager->GetMonitorNearestWindow(Shell::GetPrimaryRootWindow());
ASSERT_NE(-1, monitor.id());
EXPECT_EQ(shelf->GetIdealBounds().width(),
monitor.GetWorkAreaInsets().right());
« no previous file with comments | « ash/wm/shelf_layout_manager.cc ('k') | ash/wm/system_gesture_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698