4 This tests indenting
"three" then undoing the indent. You should see one, two and three numbered
1 through
3 then four as a sublist with number
1.
6 <a href=
"https://bugs.webkit.org/show_bug.cgi?id=28722">Bugzilla bug
</a>
8 <a href=
"rdar://problem/7169206">Radar bug
</a>
10 <ol id=
"e" contenteditable=
"true">
13 <li id=
"test">three
</li>
14 <ol><li>four
</li></ol>
19 <li>Before indent:
<span id=
"c1"></span></li>
20 <li>After indent:
<span id=
"c2"></span></li>
21 <li>After undoing:
<span id=
"c3"></span></li>
24 <script type=
"text/javascript">
26 if (window
.testRunner
) {
27 testRunner
.dumpEditingCallbacks();
28 testRunner
.dumpAsText();
31 var e
= document
.getElementById('e');
33 document
.getElementById('c1').appendChild(document
.createTextNode(e
.innerHTML
));
35 var s
= window
.getSelection();
36 var r
= document
.createRange();
37 r
.selectNode(document
.getElementById('test'));
40 document
.execCommand("Indent", false, "");
41 document
.getElementById('c2').appendChild(document
.createTextNode(e
.innerHTML
));
43 document
.execCommand("Undo");
44 document
.getElementById('c3').appendChild(document
.createTextNode(e
.innerHTML
));
46 if (document
.getElementById('c1').innerHTML
== document
.getElementById('c3').innerHTML
)
47 document
.write("The test passed");
49 document
.write("The test failed.");