blob: bfb6c23439e06690c21fd5d540435c3b9afb96c5 [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.layoutTestController)
window.layoutTestController.dumpAsText();
var s = window.getSelection();
var div = document.getElementById("test");
var id = "foo";
s.setPosition(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>