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

Unified Diff: ash/display/screen_position_controller_unittest.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix new addition Created 8 years, 2 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/screen_position_controller.cc ('k') | ash/display/shared_display_edge_indicator.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 ed5e3ca8c4ab100ec0f69b4cdcf3b012d289f365..440ae632b566e138e15f218ae46a1cd092194ef3 100644
--- a/ash/display/screen_position_controller_unittest.cc
+++ b/ash/display/screen_position_controller_unittest.cc
@@ -89,8 +89,9 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertNativePointToScreen) {
EXPECT_EQ("200x200", root_windows[1]->GetHostSize().ToString());
const gfx::Point window_pos(100, 100);
- window_->SetBoundsInScreen(gfx::Rect(window_pos, gfx::Size(100, 100)),
- gfx::Screen::GetDisplayNearestPoint(window_pos));
+ window_->SetBoundsInScreen(
+ gfx::Rect(window_pos, gfx::Size(100, 100)),
+ Shell::GetScreen()->GetDisplayNearestPoint(window_pos));
SetSecondaryDisplayLayout(DisplayLayout::RIGHT);
// The point is on the primary root window.
EXPECT_EQ("150,150", ConvertNativePointToScreen(50, 50));
@@ -126,8 +127,9 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertNativePointToScreen) {
SetSecondaryDisplayLayout(DisplayLayout::RIGHT);
const gfx::Point window_pos2(300, 100);
- window_->SetBoundsInScreen(gfx::Rect(window_pos2, gfx::Size(100, 100)),
- gfx::Screen::GetDisplayNearestPoint(window_pos2));
+ window_->SetBoundsInScreen(
+ gfx::Rect(window_pos2, gfx::Size(100, 100)),
+ Shell::GetScreen()->GetDisplayNearestPoint(window_pos2));
// The point is on the secondary display.
EXPECT_EQ("350,150", ConvertNativePointToScreen(50, 50));
// The point is out of the all root windows.
@@ -171,7 +173,7 @@ TEST_F(ScreenPositionControllerTest, MAYBE_ConvertNativePointToScreenHiDPI) {
EXPECT_EQ("200x200", root_windows[1]->GetHostSize().ToString());
ash::DisplayController* display_controller =
- ash::Shell::GetInstance()->display_controller();
+ Shell::GetInstance()->display_controller();
// Put |window_| to the primary 2x display.
window_->SetBoundsInScreen(gfx::Rect(20, 20, 50, 50),
display_controller->GetPrimaryDisplay());
« no previous file with comments | « ash/display/screen_position_controller.cc ('k') | ash/display/shared_display_edge_indicator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698