| Index: ash/display/screen_position_controller_unittest.cc
|
| diff --git a/ash/display/screen_position_controller_unittest.cc b/ash/display/screen_position_controller_unittest.cc
|
| index 333379cac7a9e4f3b9cd587fed1d80d13e399779..a4eeca655fa44b57a5cfb2d82dc5ea60b056b339 100644
|
| --- a/ash/display/screen_position_controller_unittest.cc
|
| +++ b/ash/display/screen_position_controller_unittest.cc
|
| @@ -15,6 +15,7 @@
|
| #include "ui/aura/window_tracker.h"
|
| #include "ui/aura/window_tree_host.h"
|
| #include "ui/base/layout.h"
|
| +#include "ui/display/manager/display_layout.h"
|
| #include "ui/events/test/event_generator.h"
|
| #include "ui/gfx/screen.h"
|
|
|
| @@ -41,11 +42,11 @@ namespace test {
|
|
|
| namespace {
|
|
|
| -void SetSecondaryDisplayLayout(DisplayPlacement::Position position) {
|
| - scoped_ptr<DisplayLayout> layout(Shell::GetInstance()
|
| - ->display_manager()
|
| - ->GetCurrentDisplayLayout()
|
| - .Copy());
|
| +void SetSecondaryDisplayLayout(display::DisplayPlacement::Position position) {
|
| + scoped_ptr<display::DisplayLayout> layout(Shell::GetInstance()
|
| + ->display_manager()
|
| + ->GetCurrentDisplayLayout()
|
| + .Copy());
|
| layout->placement_list[0].position = position;
|
| Shell::GetInstance()->display_manager()->SetLayoutForCurrentDisplays(
|
| std::move(layout));
|
| @@ -117,7 +118,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreen) {
|
| window_->SetBoundsInScreen(
|
| gfx::Rect(window_pos, gfx::Size(100, 100)),
|
| gfx::Screen::GetScreen()->GetDisplayNearestPoint(window_pos));
|
| - SetSecondaryDisplayLayout(DisplayPlacement::RIGHT);
|
| + SetSecondaryDisplayLayout(display::DisplayPlacement::RIGHT);
|
| // The point is on the primary root window.
|
| EXPECT_EQ("50,50", ConvertHostPointToScreen(50, 50));
|
| // The point is out of the all root windows.
|
| @@ -125,7 +126,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreen) {
|
| // The point is on the secondary display.
|
| EXPECT_EQ("250,0", ConvertHostPointToScreen(50, 400));
|
|
|
| - SetSecondaryDisplayLayout(DisplayPlacement::BOTTOM);
|
| + SetSecondaryDisplayLayout(display::DisplayPlacement::BOTTOM);
|
| // The point is on the primary root window.
|
| EXPECT_EQ("50,50", ConvertHostPointToScreen(50, 50));
|
| // The point is out of the all root windows.
|
| @@ -133,7 +134,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreen) {
|
| // The point is on the secondary display.
|
| EXPECT_EQ("50,200", ConvertHostPointToScreen(50, 400));
|
|
|
| - SetSecondaryDisplayLayout(DisplayPlacement::LEFT);
|
| + SetSecondaryDisplayLayout(display::DisplayPlacement::LEFT);
|
| // The point is on the primary root window.
|
| EXPECT_EQ("50,50", ConvertHostPointToScreen(50, 50));
|
| // The point is out of the all root windows.
|
| @@ -141,7 +142,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreen) {
|
| // The point is on the secondary display.
|
| EXPECT_EQ("-150,0", ConvertHostPointToScreen(50, 400));
|
|
|
| - SetSecondaryDisplayLayout(DisplayPlacement::TOP);
|
| + SetSecondaryDisplayLayout(display::DisplayPlacement::TOP);
|
| // The point is on the primary root window.
|
| EXPECT_EQ("50,50", ConvertHostPointToScreen(50, 50));
|
| // The point is out of the all root windows.
|
| @@ -149,7 +150,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreen) {
|
| // The point is on the secondary display.
|
| EXPECT_EQ("50,-200", ConvertHostPointToScreen(50, 400));
|
|
|
| - SetSecondaryDisplayLayout(DisplayPlacement::RIGHT);
|
| + SetSecondaryDisplayLayout(display::DisplayPlacement::RIGHT);
|
| const gfx::Point window_pos2(300, 100);
|
| window_->SetBoundsInScreen(
|
| gfx::Rect(window_pos2, gfx::Size(100, 100)),
|
| @@ -161,7 +162,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreen) {
|
| // The point is on the primary root window.
|
| EXPECT_EQ("50,0", ConvertHostPointToScreen(50, -400));
|
|
|
| - SetSecondaryDisplayLayout(DisplayPlacement::BOTTOM);
|
| + SetSecondaryDisplayLayout(display::DisplayPlacement::BOTTOM);
|
| // The point is on the secondary display.
|
| EXPECT_EQ("50,250", ConvertHostPointToScreen(50, 50));
|
| // The point is out of the all root windows.
|
| @@ -169,7 +170,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreen) {
|
| // The point is on the primary root window.
|
| EXPECT_EQ("50,0", ConvertHostPointToScreen(50, -400));
|
|
|
| - SetSecondaryDisplayLayout(DisplayPlacement::LEFT);
|
| + SetSecondaryDisplayLayout(display::DisplayPlacement::LEFT);
|
| // The point is on the secondary display.
|
| EXPECT_EQ("-150,50", ConvertHostPointToScreen(50, 50));
|
| // The point is out of the all root windows.
|
| @@ -177,7 +178,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreen) {
|
| // The point is on the primary root window.
|
| EXPECT_EQ("50,0", ConvertHostPointToScreen(50, -400));
|
|
|
| - SetSecondaryDisplayLayout(DisplayPlacement::TOP);
|
| + SetSecondaryDisplayLayout(display::DisplayPlacement::TOP);
|
| // The point is on the secondary display.
|
| EXPECT_EQ("50,-150", ConvertHostPointToScreen(50, 50));
|
| // The point is out of the all root windows.
|
|
|