[iOS] Unreviewed gardening.
[WebKit-https.git] / LayoutTests / fast / events / touch / ios / content-observation / iframe-is-shown-on-hover.html
1 <!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
2 <html>
3 <head>
4 <title>This tests the case when iframe is display as the result of a hover.</title>
5 <script src="../../../../../resources/basic-gestures.js"></script>
6 <style>
7 #tapthis {
8     width: 400px;
9     height: 400px;
10     border: 1px solid green;
11 }
12
13 #becomesVisible {
14         display: none;
15     width: 100px;
16     height: 100px;
17     background-color: green;
18     overflow: hidden;
19 }
20
21 </style>
22 <script>
23 async function test() {
24     if (!window.testRunner || !testRunner.runUIScript)
25         return;
26     if (window.internals)
27         internals.settings.setContentChangeObserverEnabled(true);
28
29     testRunner.waitUntilDone();
30     testRunner.dumpAsText();
31
32     let rect = tapthis.getBoundingClientRect();
33     let x = rect.left + rect.width / 2;
34     let y = rect.top + rect.height / 2;
35
36     await tapAtPoint(x, y);
37 }
38 </script>
39 </head>
40 <body onload="test()">
41 <div id=tapthis>PASS if 'clicked' text is not shown below.</div>
42 <iframe id=becomesVisible src="data:text/html;charset=utf-8,subframe content"></iframe>
43 <pre id=result></pre>
44 <script>
45 tapthis.addEventListener("mouseover", function( event ) {
46     becomesVisible.style.display = "block";
47     document.body.offsetHeight;
48     if (window.testRunner)
49         testRunner.notifyDone();
50 }, false);
51
52 becomesVisible.addEventListener("click", function( event ) {   
53     result.innerHTML = "clicked hidden";
54 }, false);
55
56 tapthis.addEventListener("click", function( event ) {   
57     result.innerHTML = "clicked";
58 }, false);
59 </script>
60 </body>
61 </html>