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

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: Rebase Created 6 years, 9 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/web/WebInputEventConversion.cpp ('k') | public/web/WebTouchPoint.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebInputEventConversionTest.cpp
diff --git a/Source/web/tests/WebInputEventConversionTest.cpp b/Source/web/tests/WebInputEventConversionTest.cpp
index 18c4283376bd20af930b0909db9e07d2ce041cf4..d29385528d6414ebde2bcd7536b8491654e476a7 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());
« no previous file with comments | « Source/web/WebInputEventConversion.cpp ('k') | public/web/WebTouchPoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698