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

Unified Diff: Source/WebKit/chromium/tests/WebInputEventConversionTest.cpp

Issue 12330081: Merge 143032 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 10 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 | « Source/WebKit/chromium/src/WebInputEventConversion.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/tests/WebInputEventConversionTest.cpp
===================================================================
--- Source/WebKit/chromium/tests/WebInputEventConversionTest.cpp (revision 143776)
+++ Source/WebKit/chromium/tests/WebInputEventConversionTest.cpp (working copy)
@@ -218,17 +218,19 @@
EXPECT_EQ(5, platformTouchBuilder.touchPoints()[0].radiusY());
}
+ // Reverse builders should *not* go back to physical pixels, as they are used for plugins
+ // which expect CSS pixel coordinates.
{
PlatformMouseEvent platformMouseEvent(IntPoint(10, 10), IntPoint(10, 10), LeftButton, PlatformEvent::MouseMoved, 1, false, false, false, false, 0);
RefPtr<MouseEvent> mouseEvent = MouseEvent::create(WebCore::eventNames().mousemoveEvent, domWindow, platformMouseEvent, 0, document);
WebMouseEventBuilder webMouseBuilder(view, docRenderer, *mouseEvent);
- EXPECT_EQ(20, webMouseBuilder.x);
- EXPECT_EQ(20, webMouseBuilder.y);
+ EXPECT_EQ(10, webMouseBuilder.x);
+ EXPECT_EQ(10, webMouseBuilder.y);
EXPECT_EQ(10, webMouseBuilder.globalX);
EXPECT_EQ(10, webMouseBuilder.globalY);
- EXPECT_EQ(20, webMouseBuilder.windowX);
- EXPECT_EQ(20, webMouseBuilder.windowY);
+ EXPECT_EQ(10, webMouseBuilder.windowX);
+ EXPECT_EQ(10, webMouseBuilder.windowY);
}
{
@@ -236,12 +238,12 @@
RefPtr<GestureEvent> gestureEvent = GestureEvent::create(domWindow, platformGestureEvent);
WebGestureEventBuilder webGestureBuilder(view, docRenderer, *gestureEvent);
- EXPECT_EQ(20, webGestureBuilder.x);
- EXPECT_EQ(20, webGestureBuilder.y);
+ EXPECT_EQ(10, webGestureBuilder.x);
+ EXPECT_EQ(10, webGestureBuilder.y);
EXPECT_EQ(10, webGestureBuilder.globalX);
EXPECT_EQ(10, webGestureBuilder.globalY);
- EXPECT_EQ(20, webGestureBuilder.data.scrollUpdate.deltaX);
- EXPECT_EQ(20, webGestureBuilder.data.scrollUpdate.deltaY);
+ EXPECT_EQ(10, webGestureBuilder.data.scrollUpdate.deltaX);
+ EXPECT_EQ(10, webGestureBuilder.data.scrollUpdate.deltaY);
}
{
@@ -254,10 +256,10 @@
ASSERT_EQ(1u, webTouchBuilder.touchesLength);
EXPECT_EQ(10, webTouchBuilder.touches[0].screenPosition.x);
EXPECT_EQ(10, webTouchBuilder.touches[0].screenPosition.y);
- EXPECT_EQ(20, webTouchBuilder.touches[0].position.x);
- EXPECT_EQ(20, webTouchBuilder.touches[0].position.y);
- EXPECT_EQ(20, webTouchBuilder.touches[0].radiusX);
- EXPECT_EQ(20, webTouchBuilder.touches[0].radiusY);
+ EXPECT_EQ(10, webTouchBuilder.touches[0].position.x);
+ EXPECT_EQ(10, webTouchBuilder.touches[0].position.y);
+ EXPECT_EQ(10, webTouchBuilder.touches[0].radiusX);
+ EXPECT_EQ(10, webTouchBuilder.touches[0].radiusY);
}
webViewImpl->close();
« no previous file with comments | « Source/WebKit/chromium/src/WebInputEventConversion.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698