<script>
if (window.testRunner)
    testRunner.dumpAsText();
window.onload = function()
{
    document.body.offsetTop;
    b.lastChild.parentNode.removeChild(b.lastChild);
    document.body.offsetTop;
    a.firstChild.parentNode.removeChild(a.firstChild);
}
</script>
<body>
<div id="a">foo</div><div></div>
<div>Pass if no crash or assert in Debug.    
<output>
<o&#x0195;tput>bar</output>
<span id="b">
<span>
<div style="display:inline-block"></div>
<br><br><br>
</span>
</body>
