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

Unified Diff: third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp

Issue 2624783002: Fix movementX/Y attributes for touch pointer events (Closed)
Patch Set: Wrap ForwardTouchEventWithLatencyInfo to always reset points Created 3 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
Index: third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp b/third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp
index a9651d52b3564c2c030593e4205a347317d93823..dd76ff03fd77a41915ed94c613caa233bc984937 100644
--- a/third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp
@@ -318,6 +318,8 @@ TEST(WebInputEventConversionTest, InputEventsScaling) {
webTouchEvent.touches[0].position.y = 10.4f;
webTouchEvent.touches[0].radiusX = 10.6f;
webTouchEvent.touches[0].radiusY = 10.4f;
+ webTouchEvent.touches[0].movementX = 20;
+ webTouchEvent.touches[0].movementY = 20;
EXPECT_FLOAT_EQ(10.6f, webTouchEvent.touches[0].screenPosition.x);
EXPECT_FLOAT_EQ(10.4f, webTouchEvent.touches[0].screenPosition.y);
@@ -325,6 +327,8 @@ TEST(WebInputEventConversionTest, InputEventsScaling) {
EXPECT_FLOAT_EQ(10.4f, webTouchEvent.touches[0].position.y);
EXPECT_FLOAT_EQ(10.6f, webTouchEvent.touches[0].radiusX);
EXPECT_FLOAT_EQ(10.4f, webTouchEvent.touches[0].radiusY);
+ EXPECT_EQ(20, webTouchEvent.touches[0].movementX);
+ EXPECT_EQ(20, webTouchEvent.touches[0].movementY);
WebTouchEvent transformedEvent =
TransformWebTouchEvent(view, webTouchEvent);
@@ -335,6 +339,8 @@ TEST(WebInputEventConversionTest, InputEventsScaling) {
EXPECT_FLOAT_EQ(5.2f, transformedPoint.position.y);
EXPECT_FLOAT_EQ(5.3f, transformedPoint.radiusX);
EXPECT_FLOAT_EQ(5.2f, transformedPoint.radiusY);
+ EXPECT_EQ(10, transformedPoint.movementX);
+ EXPECT_EQ(10, transformedPoint.movementY);
}
}
« no previous file with comments | « third_party/WebKit/Source/platform/WebTouchEvent.cpp ('k') | third_party/WebKit/public/platform/WebMouseEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698