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

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

Issue 149053002: Blink WebTouchPoint stores its location as WebFloatPoint, instead of WebPoint. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Relative path in DEPS lives in public/web. Created 6 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: Source/web/tests/WebInputEventConversionTest.cpp
diff --git a/Source/web/tests/WebInputEventConversionTest.cpp b/Source/web/tests/WebInputEventConversionTest.cpp
index c3e9959ab56b91aa789d4ecef924d4093e3b5e60..175c7aba85e5daa54062f364f6eaad547f1b30a8 100644
--- a/Source/web/tests/WebInputEventConversionTest.cpp
+++ b/Source/web/tests/WebInputEventConversionTest.cpp
@@ -222,12 +222,19 @@ TEST(WebInputEventConversionTest, InputEventsScaling)
webTouchEvent.type = WebInputEvent::TouchMove;
webTouchEvent.touchesLength = 1;
webTouchEvent.touches[0].state = WebTouchPoint::StateMoved;
- webTouchEvent.touches[0].screenPosition.x = 10;
- webTouchEvent.touches[0].screenPosition.y = 10;
- webTouchEvent.touches[0].position.x = 10;
- webTouchEvent.touches[0].position.y = 10;
- webTouchEvent.touches[0].radiusX = 10;
- webTouchEvent.touches[0].radiusY = 10;
+ webTouchEvent.touches[0].screenPosition.x = 10.6f;
+ webTouchEvent.touches[0].screenPosition.y = 10.4f;
+ webTouchEvent.touches[0].position.x = 10.6f;
+ webTouchEvent.touches[0].position.y = 10.4f;
+ webTouchEvent.touches[0].radiusX = 10.6f;
+ webTouchEvent.touches[0].radiusY = 10.4f;
+
+ EXPECT_FLOAT_EQ(10.6f, webTouchEvent.touches[0].screenPosition.x);
+ EXPECT_FLOAT_EQ(10.4f, webTouchEvent.touches[0].screenPosition.y);
+ EXPECT_FLOAT_EQ(10.6f, webTouchEvent.touches[0].position.x);
+ 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);
PlatformTouchEventBuilder platformTouchBuilder(view, webTouchEvent);
EXPECT_EQ(10, platformTouchBuilder.touchPoints()[0].screenPos().x());

Powered by Google App Engine
This is Rietveld 408576698