OLD | NEW |
---|---|
(Empty) | |
1 <!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.
| |
2 <html> | |
3 <head> | |
4 <script src="../../../resources/js-test.js"></script> | |
5 </head> | |
6 <body onload="test()"> | |
7 <p> This test ensures that touch events with floating point locations | |
8 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
| |
9 <div id="result">FAIL</div> | |
10 <script> | |
11 function test() | |
12 { | |
13 var x = 10.3; | |
14 var y = 10.7; | |
15 | |
16 if (window.testRunner) | |
17 testRunner.dumpAsText(); | |
18 | |
19 document.addEventListener('touchstart', function(e) { | |
20 if (e.changedTouches[0].screenX === 10 && | |
21 e.changedTouches[0].screenY === 10) { | |
22 document.getElementById("result").innerHTML = "PASS"; | |
23 } | |
24 }); | |
25 | |
26 if (window.eventSender) { | |
27 eventSender.clearTouchPoints(); | |
28 eventSender.addTouchPoint(x, y); | |
29 eventSender.touchStart(); | |
30 } | |
31 } | |
32 </script> | |
33 </body> | |
34 </html> | |
OLD | NEW |