WebCore:
[WebKit-https.git] / LayoutTests / editing / execCommand / indent-nested-lists-7.html
1 <html>
2 <body>
3 <div>
4 This tests indenting "three" and "four".  You should see 1 before "two", "three", and "five" but 2 before "four".
5 Neither "two" nor "five" should be the part of new nested list since there is text between "two" and "three", and "five" is unordered.
6 <ol id="e" contenteditable="true">
7 <li>one</li>
8 <ol><li>two</li></ol>
9 aaa
10 <li id="test3">three</li>
11 <li id="test4">four</li>
12 <ul><li>five</li></ul>
13 </ol>
14 </div>
15
16 <ul>
17 <li>Before:<span id="c1"></span></li>
18 <li>After:<span id="c2"></span></li>
19 </ul>
20
21 <script type="text/javascript">
22
23 if (window.layoutTestController) {
24     layoutTestController.dumpEditingCallbacks();
25     layoutTestController.dumpAsText();
26 }
27
28 var e = document.getElementById('e');
29
30 document.getElementById('c1').appendChild(document.createTextNode(e.innerHTML));
31
32 var s = window.getSelection();
33 var r = document.createRange();
34 r.setStart(document.getElementById('test3'),0);
35 r.setEnd(document.getElementById('test4'),1);
36 s.removeAllRanges();
37 s.addRange(r);
38 document.execCommand("Indent", false, "");
39
40 document.getElementById('c2').appendChild(document.createTextNode(e.innerHTML));
41
42 </script>