blob: 273d57cfbc8461f3c961843639b1e524e8ecf801 [file] [log] [blame]
<html>
<body>
<div>
This tests indenting "three" and "four". You should see 1 through 4 in order before numbers "two" through "five".
<ol id="e" contenteditable="true">
<li>one</li>
<ol><li>two</li></ol>
<li id="test1">three</li>
<li id="test2">four</li>
<ol><li>five</li></ol>
</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.setStart(document.getElementById('test1'),0);
r.setEnd(document.getElementById('test2'),1);
s.removeAllRanges();
s.addRange(r);
document.execCommand("Indent", false, "");
document.getElementById('c2').appendChild(document.createTextNode(e.innerHTML));
</script>