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