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

Unified Diff: ash/wm/shelf_layout_manager_unittest.cc

Issue 10540123: Rename gfx::Screen::GetMonitorXXXX to gfx::Screen::GetDisplayXXX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 cd88130fd5e5e25c615421c8916f2b6b3e080523..7bade2287ce4b66c1b3ee0ec4fdbbf35fefbd6cf 100644
--- a/ash/wm/shelf_layout_manager_unittest.cc
+++ b/ash/wm/shelf_layout_manager_unittest.cc
@@ -95,7 +95,7 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_SetVisible) {
const aura::MonitorManager* manager =
aura::Env::GetInstance()->monitor_manager();
const gfx::Display& display =
- manager->GetMonitorNearestWindow(Shell::GetPrimaryRootWindow());
+ manager->GetDisplayNearestWindow(Shell::GetPrimaryRootWindow());
ASSERT_NE(-1, display.id());
// Bottom inset should be the max of widget heights.
EXPECT_EQ(shelf_height,
@@ -112,9 +112,9 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_SetVisible) {
// Make sure the bounds of the two widgets changed.
EXPECT_GE(shelf->launcher_widget()->GetNativeView()->bounds().y(),
- gfx::Screen::GetPrimaryMonitor().bounds().bottom());
+ gfx::Screen::GetPrimaryDisplay().bounds().bottom());
EXPECT_GE(shelf->status()->GetNativeView()->bounds().y(),
- gfx::Screen::GetPrimaryMonitor().bounds().bottom());
+ gfx::Screen::GetPrimaryDisplay().bounds().bottom());
// And show it again.
SetState(shelf, ShelfLayoutManager::VISIBLE);
@@ -127,7 +127,7 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_SetVisible) {
// Make sure the bounds of the two widgets changed.
launcher_bounds = shelf->launcher_widget()->GetNativeView()->bounds();
- int bottom = gfx::Screen::GetPrimaryMonitor().bounds().bottom() -
+ int bottom = gfx::Screen::GetPrimaryDisplay().bounds().bottom() -
shelf_height;
EXPECT_EQ(launcher_bounds.y(),
bottom + (shelf->GetIdealBounds().height() -
@@ -147,7 +147,7 @@ TEST_F(ShelfLayoutManagerTest, LayoutShelfWhileAnimating) {
const aura::MonitorManager* manager =
aura::Env::GetInstance()->monitor_manager();
const gfx::Display& display =
- manager->GetMonitorNearestWindow(Shell::GetPrimaryRootWindow());
+ manager->GetDisplayNearestWindow(Shell::GetPrimaryRootWindow());
// Hide the shelf.
SetState(shelf, ShelfLayoutManager::HIDDEN);
@@ -157,9 +157,9 @@ TEST_F(ShelfLayoutManagerTest, LayoutShelfWhileAnimating) {
// Make sure the bounds of the two widgets changed.
EXPECT_GE(shelf->launcher_widget()->GetNativeView()->bounds().y(),
- gfx::Screen::GetPrimaryMonitor().bounds().bottom());
+ gfx::Screen::GetPrimaryDisplay().bounds().bottom());
EXPECT_GE(shelf->status()->GetNativeView()->bounds().y(),
- gfx::Screen::GetPrimaryMonitor().bounds().bottom());
+ gfx::Screen::GetPrimaryDisplay().bounds().bottom());
}
// Makes sure the launcher is initially sized correctly.
@@ -221,7 +221,7 @@ TEST_F(ShelfLayoutManagerTest, AutoHide) {
EXPECT_EQ(root->bounds().bottom() - ShelfLayoutManager::kAutoHideSize,
shelf->launcher_widget()->GetWindowScreenBounds().y());
EXPECT_EQ(root->bounds().bottom() - ShelfLayoutManager::kAutoHideSize,
- gfx::Screen::GetMonitorNearestWindow(root).work_area().bottom());
+ gfx::Screen::GetDisplayNearestWindow(root).work_area().bottom());
// Move the mouse to the bottom of the screen.
generator.MoveMouseTo(0, root->bounds().bottom() - 1);
@@ -233,7 +233,7 @@ TEST_F(ShelfLayoutManagerTest, AutoHide) {
EXPECT_EQ(root->bounds().bottom() - shelf->GetIdealBounds().height(),
shelf->launcher_widget()->GetWindowScreenBounds().y());
EXPECT_EQ(root->bounds().bottom() - ShelfLayoutManager::kAutoHideSize,
- gfx::Screen::GetMonitorNearestWindow(root).work_area().bottom());
+ gfx::Screen::GetDisplayNearestWindow(root).work_area().bottom());
// Move mouse back up.
generator.MoveMouseTo(0, 0);
@@ -327,7 +327,7 @@ TEST_F(ShelfLayoutManagerTest, SetAutoHideBehavior) {
widget->Show();
aura::Window* window = widget->GetNativeWindow();
gfx::Rect monitor_bounds(
- gfx::Screen::GetMonitorNearestWindow(window).bounds());
+ gfx::Screen::GetDisplayNearestWindow(window).bounds());
EXPECT_EQ(monitor_bounds.bottom() - ShelfLayoutManager::kAutoHideSize,
shelf->GetMaximizedWindowBounds(window).bottom());
EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state());
@@ -349,17 +349,17 @@ TEST_F(ShelfLayoutManagerTest, SetAutoHideBehavior) {
widget->Maximize();
EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state());
- EXPECT_EQ(gfx::Screen::GetMonitorNearestWindow(window).work_area().bottom(),
+ EXPECT_EQ(gfx::Screen::GetDisplayNearestWindow(window).work_area().bottom(),
widget->GetWorkAreaBoundsInScreen().bottom());
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
EXPECT_EQ(ShelfLayoutManager::AUTO_HIDE, shelf->visibility_state());
- EXPECT_EQ(gfx::Screen::GetMonitorNearestWindow(window).work_area().bottom(),
+ EXPECT_EQ(gfx::Screen::GetDisplayNearestWindow(window).work_area().bottom(),
widget->GetWorkAreaBoundsInScreen().bottom());
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state());
- EXPECT_EQ(gfx::Screen::GetMonitorNearestWindow(window).work_area().bottom(),
+ EXPECT_EQ(gfx::Screen::GetDisplayNearestWindow(window).work_area().bottom(),
widget->GetWorkAreaBoundsInScreen().bottom());
}
@@ -504,7 +504,7 @@ TEST_F(ShelfLayoutManagerTest, SetAlignment) {
const aura::MonitorManager* manager =
aura::Env::GetInstance()->monitor_manager();
gfx::Display display =
- manager->GetMonitorNearestWindow(Shell::GetPrimaryRootWindow());
+ manager->GetDisplayNearestWindow(Shell::GetPrimaryRootWindow());
ASSERT_NE(-1, display.id());
EXPECT_EQ(shelf->GetIdealBounds().width(),
display.GetWorkAreaInsets().left());
@@ -527,7 +527,7 @@ TEST_F(ShelfLayoutManagerTest, SetAlignment) {
shelf->SetAlignment(SHELF_ALIGNMENT_RIGHT);
launcher_bounds = shelf->launcher_widget()->GetWindowScreenBounds();
- display = manager->GetMonitorNearestWindow(Shell::GetPrimaryRootWindow());
+ display = manager->GetDisplayNearestWindow(Shell::GetPrimaryRootWindow());
ASSERT_NE(-1, display.id());
EXPECT_EQ(shelf->GetIdealBounds().width(),
display.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