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

Unified Diff: ash/extended_desktop_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 some new gfx::Screen additions 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
Index: ash/extended_desktop_unittest.cc
diff --git a/ash/extended_desktop_unittest.cc b/ash/extended_desktop_unittest.cc
index 5f4dd6c52d5e8a9f11c1c159cf679871899d48a7..8f6f1e4653b0a8e3b714c29b6749ed3e74461053 100644
--- a/ash/extended_desktop_unittest.cc
+++ b/ash/extended_desktop_unittest.cc
@@ -190,15 +190,18 @@ TEST_F(ExtendedDesktopTest, TestCursorLocation) {
aura::Window::TestApi root_window1_test_api(root_windows[1]);
root_windows[0]->MoveCursorTo(gfx::Point(10, 10));
- EXPECT_EQ("10,10", gfx::Screen::GetCursorScreenPoint().ToString());
+ EXPECT_EQ("10,10",
+ Shell::GetAshScreen()->GetCursorScreenPoint().ToString());
EXPECT_TRUE(root_window0_test_api.ContainsMouse());
EXPECT_FALSE(root_window1_test_api.ContainsMouse());
root_windows[1]->MoveCursorTo(gfx::Point(10, 20));
- EXPECT_EQ("1010,20", gfx::Screen::GetCursorScreenPoint().ToString());
+ EXPECT_EQ("1010,20",
+ Shell::GetAshScreen()->GetCursorScreenPoint().ToString());
EXPECT_FALSE(root_window0_test_api.ContainsMouse());
EXPECT_TRUE(root_window1_test_api.ContainsMouse());
root_windows[0]->MoveCursorTo(gfx::Point(20, 10));
- EXPECT_EQ("20,10", gfx::Screen::GetCursorScreenPoint().ToString());
+ EXPECT_EQ("20,10",
+ Shell::GetAshScreen()->GetCursorScreenPoint().ToString());
EXPECT_TRUE(root_window0_test_api.ContainsMouse());
EXPECT_FALSE(root_window1_test_api.ContainsMouse());
}
@@ -408,10 +411,10 @@ TEST_F(ExtendedDesktopTest, MoveWindowToDisplay) {
UpdateDisplay("1000x1000,1000x1000");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
- gfx::Display display0 =
- gfx::Screen::GetDisplayMatching(root_windows[0]->GetBoundsInScreen());
- gfx::Display display1 =
- gfx::Screen::GetDisplayMatching(root_windows[1]->GetBoundsInScreen());
+ gfx::Display display0 = Shell::GetAshScreen()->GetDisplayMatching(
+ root_windows[0]->GetBoundsInScreen());
+ gfx::Display display1 = Shell::GetAshScreen()->GetDisplayMatching(
+ root_windows[1]->GetBoundsInScreen());
EXPECT_NE(display0.id(), display1.id());
views::Widget* d1 = CreateTestWidget(gfx::Rect(10, 10, 1000, 100));

Powered by Google App Engine
This is Rietveld 408576698