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

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

Issue 2624783002: Fix movementX/Y attributes for touch pointer events (Closed)
Patch Set: Initialize m_frameScale in PointerEventFactoryTest 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 6189e7b0e2709cb0bf79dc3e3437552e45b22b16..1e5cb600f6dd871eabc4c483cc96aa2cd5d97e29 100644
--- a/third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp
@@ -308,6 +308,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);
@@ -315,6 +317,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);
@@ -325,6 +329,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);
}
}

Powered by Google App Engine
This is Rietveld 408576698