| <html> |
| <head> |
| <script> |
| function runTest() |
| { |
| if (window.layoutTestController) |
| layoutTestController.dumpAsText(); |
| |
| // Create a run-in. |
| var elem = document.createElement("div"); |
| elem.id = "run-in"; |
| elem.innerHTML = "run-in"; |
| elem.setAttribute("style", "display: run-in"); |
| document.body.appendChild(elem); |
| |
| // Create a sibling block to the run-in. |
| elem = document.createElement("div"); |
| elem.id = "block-sibling"; |
| elem.innerHTML = "block sibling"; |
| document.body.appendChild(elem); |
| |
| // Trigger a re-paint. |
| document.body.offsetTop; |
| |
| // Add a block child to the run-in. |
| elem = document.createElement("div"); |
| elem.innerHTML = "block child"; |
| elem.setAttribute("style", "display: table"); |
| document.getElementById("run-in").appendChild(elem); |
| |
| // Trigger a re-paint. |
| document.body.offsetTop; |
| |
| // Reparent the run-in's sibling block. |
| document.getElementById("output").appendChild(document.getElementById("block-sibling")); |
| document.getElementById("result").innerHTML = "PASS"; |
| } |
| </script> |
| </head> |
| <body onload="runTest()"> |
| <div id="result"></div> |
| Output: <br/> |
| <div id="output"></div> |
| </body> |
| </html> |