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

Unified Diff: ash/wm/dock/docked_window_layout_manager_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/dock/docked_window_layout_manager.cc ('k') | ash/wm/dock/docked_window_resizer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/dock/docked_window_layout_manager_unittest.cc
diff --git a/ash/wm/dock/docked_window_layout_manager_unittest.cc b/ash/wm/dock/docked_window_layout_manager_unittest.cc
index 9f0072112d4d400e3f6ddc3087e8a8eb6b394f70..2baad5e672829606e4ffb408b8b4e4706d4bbdc3 100644
--- a/ash/wm/dock/docked_window_layout_manager_unittest.cc
+++ b/ash/wm/dock/docked_window_layout_manager_unittest.cc
@@ -186,7 +186,7 @@ class DockedWindowLayoutManagerTest
ASSERT_NO_FATAL_FAILURE(DragStartAtOffsetFromwindowOrigin(window, 25, 5));
gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(window).work_area();
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(window).work_area();
gfx::Point initial_location_in_screen = initial_location_in_parent_;
::wm::ConvertPointToScreen(window->parent(), &initial_location_in_screen);
// Drag the window left or right to the edge (or almost to it).
@@ -428,7 +428,7 @@ TEST_P(DockedWindowLayoutManagerTest, AddTwoWindows) {
// Test that the gaps differ at most by a single pixel.
gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(w1.get()).work_area();
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(w1.get()).work_area();
int gap1 = w1->GetBoundsInScreen().y();
int gap2 = w2->GetBoundsInScreen().y() - w1->GetBoundsInScreen().bottom();
int gap3 = work_area.bottom() - w2->GetBoundsInScreen().bottom();
@@ -462,7 +462,7 @@ TEST_P(DockedWindowLayoutManagerTest, TwoWindowsDragging) {
// Test the new windows order and that the gaps differ at most by a pixel.
gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(w1.get()).work_area();
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(w1.get()).work_area();
int gap1 = w2->GetBoundsInScreen().y() - work_area.y();
int gap2 = w1->GetBoundsInScreen().y() - w2->GetBoundsInScreen().bottom();
int gap3 = work_area.bottom() - w1->GetBoundsInScreen().bottom();
@@ -498,7 +498,7 @@ TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsDragging) {
// Test that the top and bottom windows are clamped in work area and
// that the gaps between the windows differ at most by a pixel.
gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(w1.get()).work_area();
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(w1.get()).work_area();
int gap1 = w1->GetBoundsInScreen().y() - work_area.y();
int gap2 = w2->GetBoundsInScreen().y() - w1->GetBoundsInScreen().bottom();
int gap3 = w3->GetBoundsInScreen().y() - w2->GetBoundsInScreen().bottom();
@@ -542,7 +542,7 @@ TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsDraggingSecondScreen) {
UpdateDisplay("600x1000,600x1000");
// Layout the secondary display to the bottom of the primary.
DisplayLayout layout(DisplayLayout::BOTTOM, 0);
- ASSERT_GT(Shell::GetScreen()->GetNumDisplays(), 1);
+ ASSERT_GT(gfx::Screen::GetScreen()->GetNumDisplays(), 1);
Shell::GetInstance()->display_manager()->
SetLayoutForCurrentDisplays(layout);
@@ -565,7 +565,7 @@ TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsDraggingSecondScreen) {
EXPECT_EQ(kShellWindowId_DockedContainer, w3->parent()->id());
gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(w1.get()).work_area();
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(w1.get()).work_area();
// Test that the top and bottom windows are clamped in work area and
// that the overlaps between the windows differ at most by a pixel.
int gap1 = w1->GetBoundsInScreen().y() - work_area.y();
@@ -761,7 +761,7 @@ TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsSplitHeightEvenly) {
// The two windows should be same size vertically and almost 1/2 of work area.
gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(w1.get()).work_area();
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(w1.get()).work_area();
EXPECT_NEAR(w1->GetBoundsInScreen().height(),
w2->GetBoundsInScreen().height(),
1);
@@ -823,7 +823,7 @@ TEST_P(DockedWindowLayoutManagerTest, TwoWindowsHeightRestrictions) {
// w1 should be more than half of the work area height (even with a margin).
// w2 should be less than half of the work area height (even with a margin).
gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(w1.get()).work_area();
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(w1.get()).work_area();
EXPECT_GT(w1->GetBoundsInScreen().height(), work_area.height() / 2 + 10);
EXPECT_LT(w2->GetBoundsInScreen().height(), work_area.height() / 2 - 10);
}
@@ -851,8 +851,9 @@ TEST_P(DockedWindowLayoutManagerTest, DisplayDisconnectionMovesDocked) {
window->GetBoundsInScreen().right());
EXPECT_EQ(kShellWindowId_DockedContainer, window->parent()->id());
EXPECT_EQ(ideal_width(), window->bounds().width());
- gfx::Rect work_area =
- Shell::GetScreen()->GetDisplayNearestWindow(window.get()).work_area();
+ gfx::Rect work_area = gfx::Screen::GetScreen()
+ ->GetDisplayNearestWindow(window.get())
+ .work_area();
EXPECT_EQ(work_area.height(), window->GetBoundsInScreen().height());
}
« no previous file with comments | « ash/wm/dock/docked_window_layout_manager.cc ('k') | ash/wm/dock/docked_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698