<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<body onload="changeContent();">
This test verifies that the height of an editable block remains the same after adding block elements and removing them.
<div contenteditable="true" style="border: solid blue" id="test"></div>
<div id="console"></div>
</body>
<script>
if (window.testRunner)
    testRunner.dumpAsText();
    
function changeContent()
{
    var elem = document.getElementById("test");
    var originalHeight = elem.offsetHeight;
    elem.innerHTML = "<div>aaa</div><div>bbb</div>";
    var newHeight = elem.offsetHeight;
    elem.innerHTML = "";
    if (elem.offsetHeight != originalHeight)
        document.getElementById("console").appendChild(document.createTextNode("FAIL: expected=" + originalHeight + ", actual=" + elem.offsetHeight));
    else
        document.getElementById("console").appendChild(document.createTextNode("PASS"));;
}
</script>
</html>
