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

Unified Diff: ash/wm/window_state_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/window_resizer.cc ('k') | ash/wm/workspace/multi_window_resize_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_state_unittest.cc
diff --git a/ash/wm/window_state_unittest.cc b/ash/wm/window_state_unittest.cc
index 4c95ce7476a761d2d79d6cdeca4c2aee313209a5..9184d299418373b6e1f53158f4665183bac8d582 100644
--- a/ash/wm/window_state_unittest.cc
+++ b/ash/wm/window_state_unittest.cc
@@ -7,13 +7,13 @@
#include <utility>
#include "ash/screen_util.h"
-#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
#include "ash/wm/window_state.h"
#include "ash/wm/wm_event.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/window.h"
+#include "ui/gfx/screen.h"
namespace ash {
namespace wm {
@@ -58,7 +58,7 @@ TEST_F(WindowStateTest, SnapWindowBasic) {
UpdateDisplay("0+0-500x400, 0+500-600x400");
const gfx::Rect kPrimaryDisplayWorkAreaBounds =
- ash::Shell::GetScreen()->GetPrimaryDisplay().work_area();
+ gfx::Screen::GetScreen()->GetPrimaryDisplay().work_area();
const gfx::Rect kSecondaryDisplayWorkAreaBounds =
ScreenUtil::GetSecondaryDisplay().work_area();
@@ -105,7 +105,7 @@ TEST_F(WindowStateTest, SnapWindowMinimumSize) {
UpdateDisplay("0+0-600x900");
const gfx::Rect kWorkAreaBounds =
- ash::Shell::GetScreen()->GetPrimaryDisplay().work_area();
+ gfx::Screen::GetScreen()->GetPrimaryDisplay().work_area();
aura::test::TestWindowDelegate delegate;
scoped_ptr<aura::Window> window(CreateTestWindowInShellWithDelegate(
@@ -171,7 +171,7 @@ TEST_F(WindowStateTest, TestIgnoreTooBigMinimumSize) {
UpdateDisplay("0+0-1024x768");
const gfx::Size work_area_size =
- ash::Shell::GetScreen()->GetPrimaryDisplay().work_area().size();
+ gfx::Screen::GetScreen()->GetPrimaryDisplay().work_area().size();
const gfx::Size illegal_size(1280, 960);
const gfx::Rect illegal_bounds(gfx::Point(0, 0), illegal_size);
@@ -202,7 +202,7 @@ TEST_F(WindowStateTest, SnapWindowSetBounds) {
UpdateDisplay("0+0-900x600");
const gfx::Rect kWorkAreaBounds =
- ash::Shell::GetScreen()->GetPrimaryDisplay().work_area();
+ gfx::Screen::GetScreen()->GetPrimaryDisplay().work_area();
scoped_ptr<aura::Window> window(
CreateTestWindowInShellWithBounds(gfx::Rect(100, 100, 100, 100)));
@@ -278,7 +278,7 @@ TEST_F(WindowStateTest, AutoManaged) {
window_state->OnWMEvent(&snap_right);
const gfx::Rect kWorkAreaBounds =
- ash::Shell::GetScreen()->GetPrimaryDisplay().work_area();
+ gfx::Screen::GetScreen()->GetPrimaryDisplay().work_area();
gfx::Rect expected_snapped_bounds(
kWorkAreaBounds.x() + kWorkAreaBounds.width() / 2,
kWorkAreaBounds.y(),
@@ -323,7 +323,7 @@ TEST_F(WindowStateTest, RestoredWindowBoundsShrink) {
WindowState* window_state = GetWindowState(window.get());
EXPECT_FALSE(window_state->IsMaximized());
gfx::Rect work_area =
- ash::Shell::GetScreen()->GetPrimaryDisplay().work_area();
+ gfx::Screen::GetScreen()->GetPrimaryDisplay().work_area();
window->SetBounds(work_area);
window_state->Maximize();
« no previous file with comments | « ash/wm/window_resizer.cc ('k') | ash/wm/workspace/multi_window_resize_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698