4 This tests outdenting different selections in the lists. The test should not hang.
6 <a href=
"https://bugs.webkit.org/show_bug.cgi?id=31127">Bugzilla bug
</a>
8 <a href=
"<rdar://problem/7131805>">Radar bug
</a>
10 <div id=
"test1" contenteditable=
"true">
12 <li>hello world
<br>ciao
</li>
13 <li>how are you?
<br>good
<br></li>
17 <div id=
"test2" contenteditable=
"true">
19 <li>hello world
<br>ciao
</li>
20 <li>how are you?
<br>good
<br></li>
24 <div id=
"test3" contenteditable=
"true">
26 <li id=
"li1">hello world
<br>ciao
</li>
27 <li>how are you?
<br>good
<br></li>
31 <div id=
"test4" contenteditable=
"true">
33 <li id=
"li2">hello world
<br>ciao
</li>
34 <li id=
"li3">how are you?
<br>good
<br></li>
40 <script type=
"text/javascript">
42 if (window
.testRunner
)
43 testRunner
.dumpAsText();
45 var s
= window
.getSelection();
46 s
.setBaseAndExtent(document
.getElementById("test1"), 0, document
.getElementById("test1"), 0);
47 document
.execCommand("Outdent", false, "");
48 s
.setBaseAndExtent(document
.getElementById("test2"), 0, document
.getElementById("test2"), 2);
49 document
.execCommand("Outdent", false, "");
50 s
.setBaseAndExtent(document
.getElementById("li1").firstChild
, 0, document
.getElementById("li1").firstChild
, 4);
51 document
.execCommand("Outdent", false, "");
52 s
.setBaseAndExtent(document
.getElementById("li2").firstChild
, 0, document
.getElementById("li3").firstChild
, 3);
53 document
.execCommand("Outdent", false, "");