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

Unified Diff: ash/wm/toplevel_window_event_handler_unittest.cc

Issue 1608053002: Remove now-unnecessary wrappers around gfx::Screen::GetScreen() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-5
Patch Set: cros Created 4 years, 11 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/system_gesture_event_filter_unittest.cc ('k') | ash/wm/window_animations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/toplevel_window_event_handler_unittest.cc
diff --git a/ash/wm/toplevel_window_event_handler_unittest.cc b/ash/wm/toplevel_window_event_handler_unittest.cc
index 0322dde43afd75bad539b7194775ac7ef77be879..749d5fcb6632e988b174a02c5f4c437f2d07ff16 100644
--- a/ash/wm/toplevel_window_event_handler_unittest.cc
+++ b/ash/wm/toplevel_window_event_handler_unittest.cc
@@ -305,8 +305,9 @@ TEST_F(ToplevelWindowEventHandlerTest, BottomRightPastMinimum) {
TEST_F(ToplevelWindowEventHandlerTest, BottomRightWorkArea) {
scoped_ptr<aura::Window> target(CreateWindow(HTBOTTOMRIGHT));
- gfx::Rect work_area = Shell::GetScreen()->GetDisplayNearestWindow(
- target.get()).work_area();
+ gfx::Rect work_area = gfx::Screen::GetScreen()
+ ->GetDisplayNearestWindow(target.get())
+ .work_area();
gfx::Point position = target->bounds().origin();
// Drag further than work_area bottom.
DragFromCenterBy(target.get(), 100, work_area.height());
@@ -320,8 +321,9 @@ TEST_F(ToplevelWindowEventHandlerTest, BottomRightWorkArea) {
TEST_F(ToplevelWindowEventHandlerTest, BottomLeftWorkArea) {
scoped_ptr<aura::Window> target(CreateWindow(HTBOTTOMLEFT));
- gfx::Rect work_area = Shell::GetScreen()->GetDisplayNearestWindow(
- target.get()).work_area();
+ gfx::Rect work_area = gfx::Screen::GetScreen()
+ ->GetDisplayNearestWindow(target.get())
+ .work_area();
gfx::Point position = target->bounds().origin();
// Drag further than work_area bottom.
DragFromCenterBy(target.get(), -30, work_area.height());
@@ -336,8 +338,9 @@ TEST_F(ToplevelWindowEventHandlerTest, BottomLeftWorkArea) {
TEST_F(ToplevelWindowEventHandlerTest, BottomWorkArea) {
scoped_ptr<aura::Window> target(CreateWindow(HTBOTTOM));
- gfx::Rect work_area = Shell::GetScreen()->GetDisplayNearestWindow(
- target.get()).work_area();
+ gfx::Rect work_area = gfx::Screen::GetScreen()
+ ->GetDisplayNearestWindow(target.get())
+ .work_area();
gfx::Point position = target->bounds().origin();
// Drag further than work_area bottom.
DragFromCenterBy(target.get(), 0, work_area.height());
@@ -383,8 +386,8 @@ TEST_F(ToplevelWindowEventHandlerTest, DontDragToNegativeY) {
// Verifies we don't let windows go bigger than the display width.
TEST_F(ToplevelWindowEventHandlerTest, DontGotWiderThanScreen) {
scoped_ptr<aura::Window> target(CreateWindow(HTRIGHT));
- gfx::Rect work_area = Shell::GetScreen()->GetDisplayNearestWindow(
- target.get()).bounds();
+ gfx::Rect work_area =
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(target.get()).bounds();
DragFromCenterBy(target.get(), work_area.width() * 2, 0);
// The y location and height should not have changed.
EXPECT_EQ(work_area.width(), target->bounds().width());
« no previous file with comments | « ash/wm/system_gesture_event_filter_unittest.cc ('k') | ash/wm/window_animations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698