diff options
author | oshima <oshima@chromium.org> | 2016-02-09 19:49:56 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-10 03:50:50 +0000 |
commit | 95d499b74560f3a3bbddd164ba13be8d1c8c5a3c (patch) | |
tree | c61d7c19bf605b983bd595cb4f2e39b5e00d24e7 /ash/display/screen_position_controller_unittest.cc | |
parent | ebe83e916b8fd11a62c77d424f123a44207375b1 (diff) | |
download | chromium_src-95d499b74560f3a3bbddd164ba13be8d1c8c5a3c.zip chromium_src-95d499b74560f3a3bbddd164ba13be8d1c8c5a3c.tar.gz chromium_src-95d499b74560f3a3bbddd164ba13be8d1c8c5a3c.tar.bz2 |
Factor out DisplayPlacement from DisplayLayout
* move SwapPrimaryDisplayForTest to display_manager_test_api.h
(I'm moving primary display stuff to display manager now)
BUG=582491
TEST=no functional change. all test should still pass.
TBR=benwells@chromium.org
Review URL: https://codereview.chromium.org/1679053003
Cr-Commit-Position: refs/heads/master@{#374595}
Diffstat (limited to 'ash/display/screen_position_controller_unittest.cc')
-rw-r--r-- | ash/display/screen_position_controller_unittest.cc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/ash/display/screen_position_controller_unittest.cc b/ash/display/screen_position_controller_unittest.cc index 35a4727..fd64ee7 100644 --- a/ash/display/screen_position_controller_unittest.cc +++ b/ash/display/screen_position_controller_unittest.cc @@ -41,10 +41,10 @@ namespace test { namespace { -void SetSecondaryDisplayLayout(DisplayLayout::Position position) { +void SetSecondaryDisplayLayout(DisplayPlacement::Position position) { DisplayLayout layout = Shell::GetInstance()->display_manager()->GetCurrentDisplayLayout(); - layout.position = position; + layout.placement.position = position; Shell::GetInstance()->display_manager()-> SetLayoutForCurrentDisplays(layout); } @@ -115,7 +115,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreen) { window_->SetBoundsInScreen( gfx::Rect(window_pos, gfx::Size(100, 100)), gfx::Screen::GetScreen()->GetDisplayNearestPoint(window_pos)); - SetSecondaryDisplayLayout(DisplayLayout::RIGHT); + SetSecondaryDisplayLayout(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. @@ -123,7 +123,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreen) { // The point is on the secondary display. EXPECT_EQ("250,0", ConvertHostPointToScreen(50, 400)); - SetSecondaryDisplayLayout(DisplayLayout::BOTTOM); + SetSecondaryDisplayLayout(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. @@ -131,7 +131,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreen) { // The point is on the secondary display. EXPECT_EQ("50,200", ConvertHostPointToScreen(50, 400)); - SetSecondaryDisplayLayout(DisplayLayout::LEFT); + SetSecondaryDisplayLayout(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. @@ -139,7 +139,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreen) { // The point is on the secondary display. EXPECT_EQ("-150,0", ConvertHostPointToScreen(50, 400)); - SetSecondaryDisplayLayout(DisplayLayout::TOP); + SetSecondaryDisplayLayout(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. @@ -147,8 +147,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreen) { // The point is on the secondary display. EXPECT_EQ("50,-200", ConvertHostPointToScreen(50, 400)); - - SetSecondaryDisplayLayout(DisplayLayout::RIGHT); + SetSecondaryDisplayLayout(DisplayPlacement::RIGHT); const gfx::Point window_pos2(300, 100); window_->SetBoundsInScreen( gfx::Rect(window_pos2, gfx::Size(100, 100)), @@ -160,7 +159,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreen) { // The point is on the primary root window. EXPECT_EQ("50,0", ConvertHostPointToScreen(50, -400)); - SetSecondaryDisplayLayout(DisplayLayout::BOTTOM); + SetSecondaryDisplayLayout(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. @@ -168,7 +167,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreen) { // The point is on the primary root window. EXPECT_EQ("50,0", ConvertHostPointToScreen(50, -400)); - SetSecondaryDisplayLayout(DisplayLayout::LEFT); + SetSecondaryDisplayLayout(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. @@ -176,7 +175,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertHostPointToScreen) { // The point is on the primary root window. EXPECT_EQ("50,0", ConvertHostPointToScreen(50, -400)); - SetSecondaryDisplayLayout(DisplayLayout::TOP); + SetSecondaryDisplayLayout(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. |