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

Unified Diff: ash/display/screen_position_controller_unittest.cc

Issue 1838833002: Move DisplayLayout and DisplayLayoutBuilder From ash To ui/display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screenwinmove
Patch Set: Fix comment Created 4 years, 8 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/display/root_window_transformers_unittest.cc ('k') | ash/display/unified_mouse_warp_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « ash/display/root_window_transformers_unittest.cc ('k') | ash/display/unified_mouse_warp_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698