Chromium Code Reviews| 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> |