blob: a4825b23ddd60b90aad64e57d85593b2f9c52aac [file] [log] [blame]
<html>
<body>
<div>
This tests outdenting "one". You see 1 before "one" but 1 and 2 before "two" and "three" respectively.
<ol id="e" contenteditable="true">
<ol><li id="test">one</li>
<li>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.testRunner) {
testRunner.dumpEditingCallbacks();
testRunner.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>