Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / touch / touch-scaled-scrolled.html
blobe9a0a1e8666a2da69f863f315d3014538515bbb3
1 <!DOCTYPE html>
2 <html>
3 <head>
4 </head>
5 <body onload="runTest();" style="width:2000px;height:2000px;">
6 <div>This test is successful if event.clientX/Y are consistent with the generated input.</div>
7 <div id="result"></div>
8 <script>
9 function touched(e) {
10 document.getElementById("result").innerText = e.targetTouches[0].clientX + ', ' + e.targetTouches[0].clientY;
11 if (window.testRunner)
12 window.testRunner.notifyDone()
15 function runTest() {
16 // Scroll before scaling so we scroll the layout viewport rather than the visual.
17 window.scrollTo(100,100);
18 if (window.internals)
19 window.internals.setPageScaleFactor(2);
21 if (window.testRunner) {
22 testRunner.dumpAsText();
23 testRunner.waitUntilDone();
26 document.addEventListener("touchstart", touched, false);
27 if (window.eventSender && window.internals) {
28 eventSender.clearTouchPoints();
29 eventSender.addTouchPoint(30, 70);
30 eventSender.touchStart();
31 } else
32 debug("This test requires DumpRenderTree.");
34 </script>
35 </script>
36 </body>
37 </html>