df113144951f67731378bbc01cf72b16daa80435
[WebKit-https.git] / LayoutTests / displaylists / resources / dump-target-display-list.js
1 if (window.testRunner) {
2     testRunner.dumpAsText();
3     testRunner.waitUntilDone();
4 }
5
6 var targetDiv;
7 function doTest()
8 {
9     document.body.offsetWidth;
10     targetDiv = document.getElementById('target');
11     if (window.internals)
12         internals.setElementUsesDisplayListDrawing(targetDiv, true);
13     
14     window.setTimeout(function() {
15         if (window.internals) {
16             var displayList = internals.displayListForElement(targetDiv);
17             document.getElementById('output').textContent = displayList;
18         }
19         if (window.testRunner)
20             testRunner.notifyDone();
21     }, 0);
22 }
23 window.addEventListener('load', doTest, false);