| 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());
|
| }
|
|
|
|
|