Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / execCommand / outdent-multiparagraph-list.html
blob3a884bb14efdcbfd0f2dc200153e49252d49c114
1 <html>
2 <body>
3 <div>
4 This tests outdenting different selections in the lists. The test should not hang.
5 <p>
6 <a href="https://bugs.webkit.org/show_bug.cgi?id=31127">Bugzilla bug</a>
7 <br>
8 <a href="<rdar://problem/7131805>">Radar bug</a>
9 </p>
10 <div id="test1" contenteditable="true">
11 <ul>
12 <li>hello world<br>ciao</li>
13 <li>how are you?<br>good<br></li>
14 <div><br></div>
15 </ul>
16 </div>
17 <div id="test2" contenteditable="true">
18 <ul>
19 <li>hello world<br>ciao</li>
20 <li>how are you?<br>good<br></li>
21 <div><br></div>
22 </ul>
23 </div>
24 <div id="test3" contenteditable="true">
25 <ul>
26 <li id="li1">hello world<br>ciao</li>
27 <li>how are you?<br>good<br></li>
28 <div><br></div>
29 </ul>
30 </div>
31 <div id="test4" contenteditable="true">
32 <ul>
33 <li id="li2">hello world<br>ciao</li>
34 <li id="li3">how are you?<br>good<br></li>
35 <div><br></div>
36 </ul>
37 </div>
38 </div>
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, "");
55 </script>