blob: 3a884bb14efdcbfd0f2dc200153e49252d49c114 [file] [log] [blame]
<html>
<body>
<div>
This tests outdenting different selections in the lists. The test should not hang.
<p>
<a href="https://bugs.webkit.org/show_bug.cgi?id=31127">Bugzilla bug</a>
<br>
<a href="<rdar://problem/7131805>">Radar bug</a>
</p>
<div id="test1" contenteditable="true">
<ul>
<li>hello world<br>ciao</li>
<li>how are you?<br>good<br></li>
<div><br></div>
</ul>
</div>
<div id="test2" contenteditable="true">
<ul>
<li>hello world<br>ciao</li>
<li>how are you?<br>good<br></li>
<div><br></div>
</ul>
</div>
<div id="test3" contenteditable="true">
<ul>
<li id="li1">hello world<br>ciao</li>
<li>how are you?<br>good<br></li>
<div><br></div>
</ul>
</div>
<div id="test4" contenteditable="true">
<ul>
<li id="li2">hello world<br>ciao</li>
<li id="li3">how are you?<br>good<br></li>
<div><br></div>
</ul>
</div>
</div>
<script type="text/javascript">
if (window.testRunner)
testRunner.dumpAsText();
var s = window.getSelection();
s.setBaseAndExtent(document.getElementById("test1"), 0, document.getElementById("test1"), 0);
document.execCommand("Outdent", false, "");
s.setBaseAndExtent(document.getElementById("test2"), 0, document.getElementById("test2"), 2);
document.execCommand("Outdent", false, "");
s.setBaseAndExtent(document.getElementById("li1").firstChild, 0, document.getElementById("li1").firstChild, 4);
document.execCommand("Outdent", false, "");
s.setBaseAndExtent(document.getElementById("li2").firstChild, 0, document.getElementById("li3").firstChild, 3);
document.execCommand("Outdent", false, "");
</script>