blob: 5b00bcd5021ca6ecd981c29af9fc8a6a896b788d [file] [log] [blame]
<div id="edit" contentEditable="true">foo<br>bar</div>
<script>
if (window.layoutTestController)
window.layoutTestController.dumpAsText();
edit = document.getElementById("edit");
window.getSelection().setPosition(edit, 0);
document.execCommand("SelectAll");
document.execCommand("InsertUnorderedList");
document.execCommand("Undo");
text = document.createTextNode("This tests for a crash when undoing and then redoing after some arbitrary DOM operations are performed that effect the Undo stack. The test should not crash.");
edit.innerHTML = "";
edit.appendChild(text);
document.execCommand("Undo");
document.execCommand("Redo");
</script>