blob: 7be0734c6f1f1b7aab213f6b6b8dd49c8e6254a2 [file] [log] [blame]
<html>
<body>
<div>
This tests outdenting "two". You should see 1 before "one", "two", and "three" but 2 before "four".
<ol id="e" contenteditable="true">
<ol><li>one</li>
<li id="test">two</li>
<li>three</li></ol>
<li>four</li>
</ol>
</div>
<ul>
<li>Before:<span id="c1"></span></li>
<li>After:<span id="c2"></span></li>
</ul>
<script type="text/javascript">
if (window.layoutTestController) {
layoutTestController.dumpEditingCallbacks();
layoutTestController.dumpAsText();
}
var e = document.getElementById('e');
document.getElementById('c1').appendChild(document.createTextNode(e.innerHTML));
var s = window.getSelection();
var r = document.createRange();
r.selectNode(document.getElementById('test'));
s.removeAllRanges();
s.addRange(r);
document.execCommand("Outdent", false, "");
document.getElementById('c2').appendChild(document.createTextNode(e.innerHTML));
</script>