blob: 43175afe07fa2219f11a6a0565daa9362b26a29e [file] [log] [blame]
<div id="description">This tests for a bug where FormatBlock in a p element would leave one letter with the wrong style.</div>
<div id="edit" contentEditable="true"><p>This should be in a p element.</p><p id="p">This should be in an H2.</p></div>
<script>
if (window.layoutTestController)
window.layoutTestController.dumpAsText();
p = document.getElementById("p");
s = window.getSelection();
s.setPosition(p, 0);
document.execCommand("FormatBlock", false, "h2");
if (window.layoutTestController)
document.body.innerText = document.getElementById("description").innerText + "\n\n" + document.getElementById("edit").innerHTML;
</script>