[iOS] Unreviewed gardening.
[WebKit-https.git] / LayoutTests / fast / events / touch / ios / content-observation / crash-on-anonymous-renderer.html
1 <!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
2 <html>
3 <head>
4 <title>This tests the case when visible content has anonymous renderers.</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     position: absolute;
15     left: -1000px;
16     width: 100px;
17     height: 100px;
18     background-color: green;
19 }
20 </style>
21 <script>
22 async function test() {
23     if (!window.testRunner || !testRunner.runUIScript)
24         return;
25     if (window.internals)
26         internals.settings.setContentChangeObserverEnabled(true);
27
28     testRunner.waitUntilDone();
29     testRunner.dumpAsText();
30
31     let rect = tapthis.getBoundingClientRect();
32     let x = rect.left + rect.width / 2;
33     let y = rect.top + rect.height / 2;
34
35     await tapAtPoint(x, y);
36 }
37 </script>
38 </head>
39 <body onload="test()">
40 <div id=tapthis>PASS if no crash.</div>
41 <div id=becomesVisible>inline text with <div>text inside block</div></div>
42 <script>
43 tapthis.addEventListener("mousemove", function( event ) {
44     becomesVisible.style.left = "100px";
45     document.body.offsetHeight;
46     if (window.testRunner)
47         testRunner.notifyDone();
48 }, false);
49
50 tapthis.addEventListener("click", function( event ) {   
51     result.innerHTML = "clicked";
52 }, false);
53 </script>
54 </body>
55 </html>