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

Unified Diff: ash/wm/drag_window_resizer_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/drag_window_resizer.cc ('k') | ash/wm/immersive_fullscreen_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/drag_window_resizer_unittest.cc
diff --git a/ash/wm/drag_window_resizer_unittest.cc b/ash/wm/drag_window_resizer_unittest.cc
index 2b3faa372e7e484eea41e34c4b6ef5848f002c95..0fdd488ae6967a7798f2a58aa814efdbc2a43e2a 100644
--- a/ash/wm/drag_window_resizer_unittest.cc
+++ b/ash/wm/drag_window_resizer_unittest.cc
@@ -156,7 +156,7 @@ TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplays) {
ASSERT_EQ(2U, root_windows.size());
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
+ gfx::Screen::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
{
// Grab (0, 0) of the window.
@@ -174,7 +174,7 @@ TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplays) {
}
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
+ gfx::Screen::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
{
// Grab (0, 0) of the window and move the pointer to (775, 10).
@@ -193,7 +193,7 @@ TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplays) {
}
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
+ gfx::Screen::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
{
// Grab the top-right edge of the window and move the pointer to (0, 10)
@@ -216,7 +216,7 @@ TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplays) {
// Dropping a window that is larger than the destination work area
// will shrink to fit to the work area.
window_->SetBoundsInScreen(gfx::Rect(0, 0, 700, 500),
- Shell::GetScreen()->GetPrimaryDisplay());
+ gfx::Screen::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
{
// Grab the top-right edge of the window and move the pointer to (0, 10)
@@ -241,7 +241,7 @@ TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplays) {
// Dropping a window that is larger than the destination work area
// will shrink to fit to the work area.
window_->SetBoundsInScreen(gfx::Rect(0, 0, 700, 500),
- Shell::GetScreen()->GetPrimaryDisplay());
+ gfx::Screen::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
{
// Grab the top-left edge of the window and move the pointer to (150, 10)
@@ -283,7 +283,7 @@ TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplaysActiveRoot) {
window->Init(ui::LAYER_TEXTURED);
ParentWindowInPrimaryRootWindow(window.get());
window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
+ gfx::Screen::GetScreen()->GetPrimaryDisplay());
window->Show();
EXPECT_TRUE(ash::wm::CanActivateWindow(window.get()));
ash::wm::ActivateWindow(window.get());
@@ -316,7 +316,7 @@ TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplaysRightToLeft) {
window_->SetBoundsInScreen(
gfx::Rect(800, 00, 50, 60),
- Shell::GetScreen()->GetDisplayNearestWindow(root_windows[1]));
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(root_windows[1]));
EXPECT_EQ(root_windows[1], window_->GetRootWindow());
{
// Grab (0, 0) of the window.
@@ -342,7 +342,7 @@ TEST_F(DragWindowResizerTest, DragWindowController) {
ASSERT_EQ(2U, root_windows.size());
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
+ gfx::Screen::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity());
{
@@ -396,7 +396,7 @@ TEST_F(DragWindowResizerTest, DragWindowController) {
// Do the same test with RevertDrag().
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
+ gfx::Screen::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity());
{
@@ -476,7 +476,7 @@ TEST_F(DragWindowResizerTest, CursorDeviceScaleFactor) {
// window with 2.0 device scale factor.
{
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
+ gfx::Screen::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
// Grab (0, 0) of the window.
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
@@ -500,7 +500,7 @@ TEST_F(DragWindowResizerTest, CursorDeviceScaleFactor) {
default_container->AddChild(window_.get());
window_->SetBoundsInScreen(
gfx::Rect(600, 0, 50, 60),
- Shell::GetScreen()->GetDisplayNearestWindow(root_windows[1]));
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(root_windows[1]));
EXPECT_EQ(root_windows[1], window_->GetRootWindow());
// Grab (0, 0) of the window.
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
@@ -531,7 +531,7 @@ TEST_F(DragWindowResizerTest, MoveWindowAcrossDisplays) {
{
aura::Window* window = window_.get();
window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
+ gfx::Screen::GetScreen()->GetPrimaryDisplay());
// Grab (0, 0) of the window.
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window, gfx::Point(), HTCAPTION));
@@ -547,7 +547,7 @@ TEST_F(DragWindowResizerTest, MoveWindowAcrossDisplays) {
{
aura::Window* window = always_on_top_window_.get();
window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
+ gfx::Screen::GetScreen()->GetPrimaryDisplay());
// Grab (0, 0) of the window.
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window, gfx::Point(), HTCAPTION));
@@ -563,7 +563,7 @@ TEST_F(DragWindowResizerTest, MoveWindowAcrossDisplays) {
{
aura::Window* window = system_modal_window_.get();
window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
+ gfx::Screen::GetScreen()->GetPrimaryDisplay());
aura::Env::GetInstance()->set_last_mouse_location(gfx::Point(0, 0));
// Grab (0, 0) of the window.
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
@@ -580,7 +580,7 @@ TEST_F(DragWindowResizerTest, MoveWindowAcrossDisplays) {
{
aura::Window* window = transient_child_;
window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
+ gfx::Screen::GetScreen()->GetPrimaryDisplay());
// Grab (0, 0) of the window.
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window, gfx::Point(), HTCAPTION));
@@ -596,7 +596,7 @@ TEST_F(DragWindowResizerTest, MoveWindowAcrossDisplays) {
{
aura::Window* window = transient_parent_.get();
window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
+ gfx::Screen::GetScreen()->GetPrimaryDisplay());
// Grab (0, 0) of the window.
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window, gfx::Point(), HTCAPTION));
@@ -612,7 +612,7 @@ TEST_F(DragWindowResizerTest, MoveWindowAcrossDisplays) {
{
aura::Window* window = panel_window_.get();
window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
- Shell::GetScreen()->GetPrimaryDisplay());
+ gfx::Screen::GetScreen()->GetPrimaryDisplay());
// Grab (0, 0) of the window.
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window, gfx::Point(), HTCAPTION));
« no previous file with comments | « ash/wm/drag_window_resizer.cc ('k') | ash/wm/immersive_fullscreen_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698