| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 </head> | 4 </head> |
| 5 <body onload="runTest();" style="width:2000px;height:2000px;"> | 5 <body onload="runTest();" style="width:2000px;height:2000px;"> |
| 6 <div>This test is successful if event.clientX/Y are consistent with the generate
d input.</div> | 6 <div>This test is successful if event.clientX/Y are consistent with the generate
d input.</div> |
| 7 <div id="result"></div> | 7 <div id="result"></div> |
| 8 <script> | 8 <script> |
| 9 function touched(e) { | 9 function touched(e) { |
| 10 document.getElementById("result").innerText = e.targetTouches[0].clientX + '
, ' + e.targetTouches[0].clientY; | 10 document.getElementById("result").innerText = e.targetTouches[0].clientX + '
, ' + e.targetTouches[0].clientY; |
| 11 if (window.testRunner) | 11 if (window.testRunner) |
| 12 window.testRunner.notifyDone() | 12 window.testRunner.notifyDone() |
| 13 } | 13 } |
| 14 | 14 |
| 15 function runTest() { | 15 function runTest() { |
| 16 if (window.internals) | 16 if (window.eventSender) |
| 17 window.internals.setPageScaleFactor(2, 0, 0); | 17 window.eventSender.setPageScaleFactor(2, 0, 0); |
| 18 window.scrollTo(100,100); | 18 window.scrollTo(100,100); |
| 19 | 19 |
| 20 if (window.testRunner) { | 20 if (window.testRunner) { |
| 21 testRunner.dumpAsText(); | 21 testRunner.dumpAsText(); |
| 22 testRunner.waitUntilDone(); | 22 testRunner.waitUntilDone(); |
| 23 } | 23 } |
| 24 | 24 |
| 25 document.addEventListener("touchstart", touched, false); | 25 document.addEventListener("touchstart", touched, false); |
| 26 if (window.eventSender) { | 26 if (window.eventSender) { |
| 27 eventSender.clearTouchPoints(); | 27 eventSender.clearTouchPoints(); |
| 28 eventSender.addTouchPoint(30, 70); | 28 eventSender.addTouchPoint(30, 70); |
| 29 eventSender.touchStart(); | 29 eventSender.touchStart(); |
| 30 } else | 30 } else |
| 31 debug("This test requires DumpRenderTree."); | 31 debug("This test requires DumpRenderTree."); |
| 32 } | 32 } |
| 33 </script> | 33 </script> |
| 34 </script> | 34 </script> |
| 35 </body> | 35 </body> |
| 36 </html> | 36 </html> |
| OLD | NEW |