Tiles on bottom of screen are not always allocated when necessary
[WebKit-https.git] / LayoutTests / compositing / visible-rect / iframe-no-layers.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4     <style>
5         body {
6             height: 1500px;
7             width: 1500px;
8         }
9         
10         iframe {
11             margin: 10px;
12             border: 0px solid black;
13         }
14     </style>
15     <script>
16         if (window.testRunner)
17             testRunner.dumpAsText();
18
19         function scroll()
20         {
21             window.scrollTo(40, 40);
22             testIsDone();
23         }
24
25         // This function is called twice - once from this frame and once from the iframe.
26         var scrollingCompleted = 0;
27         function testIsDone()
28         {
29             scrollingCompleted++;
30             if (scrollingCompleted == 2) {
31                 if (window.internals) {
32                     // Dump the iframe's layers.
33                     var iframe = document.getElementById('iframe');
34                     document.getElementById('layers').innerText = internals.layerTreeAsText(iframe.contentDocument, internals.LAYER_TREE_INCLUDES_VISIBLE_RECTS)
35                 }
36                 if (window.testRunner)
37                     testRunner.notifyDone();
38             }
39         }
40         window.addEventListener('load', scroll, false);
41
42         if (window.testRunner)
43             testRunner.waitUntilDone();
44     </script>
45 </head>
46 <body>
47
48     <iframe id="iframe" src="resources/subframe-with-layers.html"></iframe>
49
50 <pre id="layers">Layer tree goes here when testing</pre>
51 </body>
52 </html>