Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dynamic / inline-to-block-crash.html
blob6e8f2b8be3b8a78891f0792492cd57dbda3950fe
1 <script>
3 // This tests a particular sequence of render tree changes, which
4 // caused a crash in the code that maintains the line box tree.
5 // Even small changes to the test make it no longer crash, so it
6 // should be left as-is. That's why the test results don't say
7 // anything about what this tests -- adding that caused the crash
8 // to go away!
10 function turnAnchorIntoBlock()
12 document.getElementById("a").style.display = "block";
13 document.getElementById("span").firstChild.data = "PASSED";
14 if (window.testRunner)
15 testRunner.notifyDone();
18 function turnSpanIntoBlock()
20 document.body.offsetHeight; // trigger layout
21 document.getElementById("span").style.display = "block";
23 setTimeout(turnAnchorIntoBlock, 0);
26 function runTest()
28 if (window.testRunner) {
29 testRunner.dumpAsText();
30 testRunner.waitUntilDone();
32 setTimeout(turnSpanIntoBlock, 0);
35 </script>
37 <body onload="runTest()">
39 <a id="a">
40 <span id="span">TEST HAS NOT RUN YET</span>
41 </a>
43 </body>