Change fast/e* files to use pre and post js files in LayoutTests/resources.
[WebKit-https.git] / LayoutTests / fast / events / touch / touch-scaled-scrolled.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../../resources/js-test-pre.js"></script>
5 </head>
6 <body onload="runTest();" style="width:2000px;height:2000px;">
7 <div>This test is successful if event.clientX/Y are consistent with the generated input.</div>
8 <div id="result"></div>
9 <script>
10 function touched(e) {
11     document.getElementById("result").innerText = e.targetTouches[0].clientX + ', ' + e.targetTouches[0].clientY;
12     if (window.testRunner)
13         window.testRunner.notifyDone()
14 }
15
16 function runTest() {
17     if (window.internals)
18         window.internals.setPageScaleFactor(2, 0, 0);
19     window.scrollTo(100,100);
20
21     if (window.testRunner) {
22         testRunner.dumpAsText();
23         testRunner.waitUntilDone();
24     }
25
26     document.addEventListener("touchstart", touched, false);
27     if (window.eventSender) {
28         eventSender.clearTouchPoints();
29         eventSender.addTouchPoint(30, 70);
30         eventSender.touchStart();
31     } else
32         debug("This test requires DumpRenderTree.");
33 }
34 </script>
35 </script>
36 </body>
37 </html>