4 This tests indenting
"three" then executes the undo command after changing the editability to false.
5 You should see one, two numbered
1 through
2 then three and four as a sublist starting with number
1.
6 The undo should have no effect.
8 <a href=
"https://bugs.webkit.org/show_bug.cgi?id=32079">Bugzilla bug
</a>
10 <a href=
"rdar://problem/6557066">Radar bug
</a>
12 <ol id=
"e" contenteditable=
"true">
15 <li id=
"test">three
</li>
16 <ol><li>four
</li></ol>
21 <li>Before indent:
<span id=
"c1"></span></li>
22 <li>After indent:
<span id=
"c2"></span></li>
23 <li>After undoing:
<span id=
"c3"></span></li>
26 <script type=
"text/javascript">
28 if (window
.testRunner
)
29 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
));
42 e
.contentEditable
= false;
43 document
.execCommand("Undo");
44 document
.getElementById('c3').appendChild(document
.createTextNode(e
.innerHTML
));
46 if (document
.getElementById('c2').innerHTML
== document
.getElementById('c3').innerHTML
)
47 document
.write("The test passed");
49 document
.write("The test failed.");