Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / execCommand / remove-list-items.html
blob99b0769e9669405c7f1cb9387ed56abf8208de95
1 <script>
2 if (window.testRunner) {
3 testRunner.dumpEditingCallbacks();
4 testRunner.dumpAsText();
7 function log(message) {
8 var console = document.getElementById("console");
9 var text = document.createTextNode(message);
10 console.appendChild(text);
13 </script>
14 <p>This test checks to see that Insert{Un}OrderedList can remove items from a list, can remove empty list when they are emptied, and can remove content from orphaned list items.</p>
15 <div id="div" contenteditable="true">
16 <ol style="border: 1px solid red;">
17 <li>foo</li>
18 <span id="item1">This should not be a list.</span>
19 <br><br>
20 bar
21 <li>baz</li>
22 <span id="item2">This should not be in a list.</span>
23 <li>foo</li>
24 <li><span id="item3">This should not be in a list.</span></li>
25 <li>bar</li>
26 </ol>
27 <li><span id="item4">This should not be in a list.</span></li>
28 <ul><li><span id="item5">This should not be in a list.</span></li></ul>
29 </div>
30 <p id="console"></p>
32 <script>
33 var s = window.getSelection();
34 s.collapse(document.getElementById("item1"), 0);
35 document.execCommand("InsertOrderedList", false, "");
36 s.collapse(document.getElementById("item2"), 0);
37 document.execCommand("InsertOrderedList", false, "");
38 s.collapse(document.getElementById("item3"), 0);
39 document.execCommand("InsertOrderedList", false, "");
40 s.collapse(document.getElementById("item4"), 0);
41 document.execCommand("InsertUnorderedList", false, "");
42 s.collapse(document.getElementById("item5"), 0);
43 document.execCommand("InsertUnorderedList", false, "");
45 log(div.innerHTML);
47 </script>