blob: a998e8d1c094c8d7d2ed3c42820d1ff096cf41dd [file] [log] [blame]
<div id="description">This test makes sure InsertOrderedList ignores the third argument passed to execCommand and does not add an id attribute to the inserted list.</div>
<div id="test" contenteditable="true">list item</div>
<script>
if (window.testRunner)
window.testRunner.dumpAsText();
var s = window.getSelection();
var div = document.getElementById("test");
var id = "foo";
s.collapse(div, 0);
document.execCommand("InsertOrderedList", false, id);
expected = "<ol><li>list item</li></ol>";
actual = div.innerHTML;
output = document.getElementById("description").innerText + "\n\n";
if (expected == actual)
output += "Success";
else
output += "Failure. Expected: " + expected + ", found: " + actual;
document.body.innerText = output;
</script>