Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / touch / touch-over-hidden-iframe.html
blob2e27797bdda17a137fe92577aac8a6f0c55c979a
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <style type="text/css">
4 #box {
5 height: 200px;
6 width: 200px;
9 #over {
10 z-index: 9000;
11 position: absolute;
12 top: -50px;
13 left: -50px;
16 #frame {
17 width: 400px;
18 height: 400px;
19 z-index: -1;
20 position: absolute;
21 visibility: hidden;
22 left: 0;
23 top: 0;
25 </style>
26 <div id="box">Touches go here</div>
27 <div id="over">
28 <iframe id="frame"></iframe>
29 </div>
31 <p id="description"></p>
32 <div id="console"></div>
34 <script type="text/javascript">
35 description("Tests that touch events on a an element covered by a hidden iframe trigger the touch handlers.");
37 window.jsTestIsAsync = true;
38 document.querySelector("#box").addEventListener("touchstart", testComplete);
40 function testComplete(event)
42 touch = event.touches[0];
43 shouldBe("touch.pageX", "50");
44 shouldBe("touch.pageY", "50");
45 finishJSTest();
48 function runTest() {
49 if (window.eventSender) {
50 eventSender.addTouchPoint(50, 50);
51 eventSender.touchStart();
52 } else {
53 debug("This test requires DRT.");
57 window.onload = runTest;
58 </script>