[iOS] Unreviewed gardening.
[WebKit-https.git] / LayoutTests / fast / events / touch / ios / content-observation / clickable-content-is-inside-a-container.html
1 <!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
2 <html>
3 <head>
4 <title>This tests the case when we've got all the renderers constructed before they become visible and the container is not clickable.</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     max-height: 0px;
15     width: 100px;
16     height: 100px;
17     background-color: green;
18     overflow: hidden;
19 }
20
21 #becomesVisibleChild {
22     width: 50px;
23     height: 50px;
24     background-color: blue;
25 }
26
27 </style>
28 <script>
29 async function test() {
30     if (!window.testRunner || !testRunner.runUIScript)
31         return;
32     if (window.internals)
33         internals.settings.setContentChangeObserverEnabled(true);
34
35     testRunner.waitUntilDone();
36     testRunner.dumpAsText();
37
38     let rect = tapthis.getBoundingClientRect();
39     let x = rect.left + rect.width / 2;
40     let y = rect.top + rect.height / 2;
41
42     await tapAtPoint(x, y);
43 }
44 </script>
45 </head>
46 <body onload="test()">
47 <div id=tapthis>PASS if 'clicked' text is not shown below.</div>
48 <div id=becomesVisible><div id=becomesVisibleChild></div></div>
49 <pre id=result></pre>
50 <script>
51 tapthis.addEventListener("mouseover", function( event ) {
52     becomesVisible.style.maxHeight = "100px";
53     document.body.offsetHeight;
54     if (window.testRunner)
55         testRunner.notifyDone();
56 }, false);
57
58 becomesVisibleChild.addEventListener("click", function( event ) {   
59     result.innerHTML = "clicked hidden";
60 }, false);
61
62 tapthis.addEventListener("click", function( event ) {   
63     result.innerHTML = "clicked";
64 }, false);
65 </script>
66 </body>
67 </html>