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

Unified Diff: LayoutTests/fast/events/touch/touch-coords-rounded.html

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 / minor fixes. Created 6 years, 11 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 | « no previous file | LayoutTests/fast/events/touch/touch-coords-rounded-expected.txt » ('j') | public/DEPS » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/touch/touch-coords-rounded.html
diff --git a/LayoutTests/fast/events/touch/touch-coords-rounded.html b/LayoutTests/fast/events/touch/touch-coords-rounded.html
new file mode 100644
index 0000000000000000000000000000000000000000..5b33ab572941a79a7456ca8948f3217a1d7cbdba
--- /dev/null
+++ b/LayoutTests/fast/events/touch/touch-coords-rounded.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
jamesr 2014/02/03 21:48:23 say <!DOCTYPE html> if you want to define a modern
tdresser 2014/02/04 14:46:23 Done.
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+</head>
+<body onload="test()">
+<p> This test ensures that touch events with floating point locations
+have their locations floored before they are passed to javascript.</p>
jamesr 2014/02/03 21:48:23 if we specify these values as type 'long' in the W
tdresser 2014/02/04 14:46:23 That's what's happening, isn't it? I guess I've wo
+<div id="result">FAIL</div>
+<script>
+function test()
+{
+ var x = 10.3;
+ var y = 10.7;
+
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ document.addEventListener('touchstart', function(e) {
+ if (e.changedTouches[0].screenX === 10 &&
+ e.changedTouches[0].screenY === 10) {
+ document.getElementById("result").innerHTML = "PASS";
+ }
+ });
+
+ if (window.eventSender) {
+ eventSender.clearTouchPoints();
+ eventSender.addTouchPoint(x, y);
+ eventSender.touchStart();
+ }
+}
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/events/touch/touch-coords-rounded-expected.txt » ('j') | public/DEPS » ('J')

Powered by Google App Engine
This is Rietveld 408576698