<html>
<body>
<div style="width: 25px">
<img style="width: 20px"><img id="test1" style="width: 50px; display: none;"><span id="test2" style="float: left;">AB</span>CD</div>
<script>
if (window.testRunner)
    testRunner.dumpAsText();
    
document.body.offsetTop;
test1.style.display = "";
document.body.offsetTop;
test2.parentNode.removeChild(test2);

document.body.offsetTop;
document.body.innerHTML = "PASS: does not crash";
</script>
</body>
</html>
