c8c005d347aa073a41b5be34485abc6084481d41
[WebKit-https.git] / LayoutTests / editing / execCommand / create-list-from-range-selection.html
1 <script>
2 if (window.layoutTestController)
3      layoutTestController.dumpEditingCallbacks();
4 </script>
5 <p>This tests Insert{Un}OrderedList on a range selection that contains a mix of list and non-list content.</p>
6 <div id="test" contenteditable="true">asd<span id="start">foo</span><br><ul><li>bar</li></ul>baz<br>foo<ol><li>bar</li></ol><span id="end">baz</span></div>
7 <script>
8 var s = window.getSelection();
9 var start = document.getElementById("start").firstChild;
10 var end = document.getElementById("end").firstChild;
11 s.setBaseAndExtent(start, 2, end, 2);
12 document.execCommand("InsertOrderedList", false, "");
13 </script>