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

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 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/shared_display_edge_indicator.cc ('k') | ash/keyboard_overlay/keyboard_overlay_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/extended_desktop_unittest.cc
diff --git a/ash/extended_desktop_unittest.cc b/ash/extended_desktop_unittest.cc
index 4cc75faa136612d24197472f18dd7330e5bfaf19..aad69a93e0177dff25384dbe2e164404bfa2b498 100644
--- a/ash/extended_desktop_unittest.cc
+++ b/ash/extended_desktop_unittest.cc
@@ -194,15 +194,15 @@ 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::GetScreen()->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::GetScreen()->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::GetScreen()->GetCursorScreenPoint().ToString());
EXPECT_TRUE(root_window0_test_api.ContainsMouse());
EXPECT_FALSE(root_window1_test_api.ContainsMouse());
}
@@ -412,10 +412,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::GetScreen()->GetDisplayMatching(
+ root_windows[0]->GetBoundsInScreen());
+ gfx::Display display1 = Shell::GetScreen()->GetDisplayMatching(
+ root_windows[1]->GetBoundsInScreen());
EXPECT_NE(display0.id(), display1.id());
views::Widget* d1 = CreateTestWidget(gfx::Rect(10, 10, 1000, 100));
@@ -609,7 +609,7 @@ TEST_F(ExtendedDesktopTest, KeyEventsOnLockScreen) {
// Create normal windows on both displays.
views::Widget* widget1 = CreateTestWidget(
- gfx::Screen::GetPrimaryDisplay().bounds());
+ Shell::GetScreen()->GetPrimaryDisplay().bounds());
widget1->Show();
EXPECT_EQ(root_windows[0], widget1->GetNativeView()->GetRootWindow());
views::Widget* widget2 = CreateTestWidget(
@@ -619,7 +619,7 @@ TEST_F(ExtendedDesktopTest, KeyEventsOnLockScreen) {
// Create a LockScreen window.
views::Widget* lock_widget = CreateTestWidget(
- gfx::Screen::GetPrimaryDisplay().bounds());
+ Shell::GetScreen()->GetPrimaryDisplay().bounds());
views::Textfield* textfield = new views::Textfield;
lock_widget->SetContentsView(textfield);
« no previous file with comments | « ash/display/shared_display_edge_indicator.cc ('k') | ash/keyboard_overlay/keyboard_overlay_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698