Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / deleting / delete-block-contents-004.html
blobf6dbd5f20b0a93dedb52ac11970b5d7831336efa
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2 <html>
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>
7 </body>
8 <script>
9 if (window.testRunner)
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;
18 elem.innerHTML = "";
19 if (elem.offsetHeight != originalHeight)
20 document.getElementById("console").appendChild(document.createTextNode("FAIL: expected=" + originalHeight + ", actual=" + elem.offsetHeight));
21 else
22 document.getElementById("console").appendChild(document.createTextNode("PASS"));;
24 </script>
25 </html>