Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / touch / touch-inside-iframe.html
blob3dce64678cec11399accab2016cb8b1c43f358ee
1 <html>
2 <script src="../../../resources/js-test.js"></script>
3 <body>
4 <iframe style="position:absolute; top:100px; left:100px;" src="./resources/touch-inside-iframe2.html"></iframe>
5 <p id="description"></p>
6 <div id="console"></div>
7 <script type="text/javascript">
8 description('Test iframes receive touches correctly.');
10 var touch = null;
12 function testComplete(event)
14 touch = event.touches[0];
15 shouldBe("touch.pageX", "50");
16 shouldBe("touch.pageY", "50");
17 isSuccessfullyParsed();
18 testRunner.notifyDone();
21 function runTest() {
22 if (window.eventSender) {
23 // Touch the center of the div in the iframe.
24 // 100px is offset to iframe in main frame,
25 // 2px for the iframe border, 50px to get to centre of the div.
26 eventSender.addTouchPoint(152, 152);
27 eventSender.touchStart();
28 } else {
29 debug('This test requires DRT.');
33 if (window.testRunner) {
34 testRunner.waitUntilDone();
36 </script>
37 </body>
38 </html>