blob: 2bd2bb2953e0f80d2d29220a744b03ffa14a7183 [file] [log] [blame]
<div id="description1">This tests creating a list from an empty paragraph with bold already applied to it. The word below should be bold.</div>
<div id="edit1" contentEditable="true"><div><b><br></b></div></div>
<div id="description2">This tests creating a list from an empty paragraph when the typing style was Bold. The word below should be bold.</div>
<div id="edit2" contentEditable="true"></div>
<div id="description3">This tests indenting an empty paragraph with bold already applied to it. The word below should be bold.</div>
<div id="edit3" contentEditable="true"><div><b><br></b></div></div>
<div id="description4">This tests indenting an empty paragraph when the typing style was Bold. The word below should be bold.</div>
<div id="edit4" contentEditable="true"></div>
<div id="description5">This tests outdenting an empty paragraph with bold already applied to it. The word below should be bold.</div>
<div id="edit5" contentEditable="true"><blockquote class="webkit-indent-blockquote"><b><br></b></blockquote></div>
<div id="description6">This tests indenting an empty paragraph when the typing style was Bold. The word below should be bold.</div>
<div id="edit6" contentEditable="true"></div>
<script>
if (window.testRunner)
window.testRunner.dumpAsText();
edit1 = document.getElementById("edit1");
edit1.focus();
document.execCommand("InsertUnorderedList");
document.execCommand("InsertText", false, "Bold");
edit2 = document.getElementById("edit2");
edit2.focus();
document.execCommand("Bold");
document.execCommand("InsertUnorderedList");
document.execCommand("InsertText", false, "Bold");
edit3 = document.getElementById("edit3");
edit3.focus();
document.execCommand("Indent");
document.execCommand("InsertText", false, "Bold");
edit4 = document.getElementById("edit4");
edit4.focus();
document.execCommand("Bold");
document.execCommand("Indent");
document.execCommand("InsertText", false, "Bold");
edit5 = document.getElementById("edit5");
edit5.focus();
document.execCommand("Outdent");
document.execCommand("InsertText", false, "Bold");
edit6 = document.getElementById("edit6");
edit6.focus();
document.execCommand("Bold");
document.execCommand("Outdent");
document.execCommand("InsertText", false, "Bold");
if (window.testRunner)
document.body.innerText = document.getElementById("description1").innerText + "\n" + edit1.innerHTML + "\n\n" +
document.getElementById("description2").innerText + "\n" + edit2.innerHTML + "\n\n" +
document.getElementById("description3").innerText + "\n" + edit3.innerHTML + "\n\n" +
document.getElementById("description4").innerText + "\n" + edit4.innerHTML + "\n\n" +
document.getElementById("description5").innerText + "\n" + edit5.innerHTML + "\n\n" +
document.getElementById("description6").innerText + "\n" + edit6.innerHTML;
</script>