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

Unified Diff: ash/wm/drag_window_resizer_unittest.cc

Issue 226293005: Use platform's device scale factor for cursor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new tests Created 6 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
Index: ash/wm/drag_window_resizer_unittest.cc
diff --git a/ash/wm/drag_window_resizer_unittest.cc b/ash/wm/drag_window_resizer_unittest.cc
index dbb4da0a092ea9a105a60b5cd23b0ba36a819cc0..369a285f53f50504bc6b3782322d1df466391b7b 100644
--- a/ash/wm/drag_window_resizer_unittest.cc
+++ b/ash/wm/drag_window_resizer_unittest.cc
@@ -494,13 +494,13 @@ TEST_F(DragWindowResizerTest, CursorDeviceScaleFactor) {
// Grab (0, 0) of the window.
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window_.get(), gfx::Point(), HTCAPTION));
- EXPECT_EQ(1.0f, cursor_test_api.GetDisplay().device_scale_factor());
+ EXPECT_EQ(1.0f, cursor_test_api.GetCurrentCursor().device_scale_factor());
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
WarpMouseCursorIfNecessary(root_windows[0], gfx::Point(399, 200));
- EXPECT_EQ(2.0f, cursor_test_api.GetDisplay().device_scale_factor());
+ EXPECT_EQ(2.0f, cursor_test_api.GetCurrentCursor().device_scale_factor());
resizer->CompleteDrag();
- EXPECT_EQ(2.0f, cursor_test_api.GetDisplay().device_scale_factor());
+ EXPECT_EQ(2.0f, cursor_test_api.GetCurrentCursor().device_scale_factor());
}
// Move window from the root window with 2.0 device scale factor to the root
@@ -518,13 +518,13 @@ TEST_F(DragWindowResizerTest, CursorDeviceScaleFactor) {
// Grab (0, 0) of the window.
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window_.get(), gfx::Point(), HTCAPTION));
- EXPECT_EQ(2.0f, cursor_test_api.GetDisplay().device_scale_factor());
+ EXPECT_EQ(2.0f, cursor_test_api.GetCurrentCursor().device_scale_factor());
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, -200, 200), 0);
WarpMouseCursorIfNecessary(root_windows[1], gfx::Point(400, 200));
- EXPECT_EQ(1.0f, cursor_test_api.GetDisplay().device_scale_factor());
+ EXPECT_EQ(1.0f, cursor_test_api.GetCurrentCursor().device_scale_factor());
resizer->CompleteDrag();
- EXPECT_EQ(1.0f, cursor_test_api.GetDisplay().device_scale_factor());
+ EXPECT_EQ(1.0f, cursor_test_api.GetCurrentCursor().device_scale_factor());
}
}

Powered by Google App Engine
This is Rietveld 408576698