summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/editing/execCommand/remove-list-from-range-selection.html
blob: 37886ade9eee8c845176a4daf0b342d748cafb53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<script>
if (window.layoutTestController)
     layoutTestController.dumpEditingCallbacks();
</script>
<p>This tests Insert{Un}OrderedList on a range selection that is entirely within one list.</p>
<div id="test" contenteditable="true"><ol><li><span id="start">None of the</span></li><li>selected content</li><li>should be</li><li><span id="end">in a list.</span></li></ol><ol><li>This should be in a list and should not be selected.</li></ol></div>
<script>
var s = window.getSelection();
var start = document.getElementById("start").firstChild;
var end = document.getElementById("end").firstChild;
s.setBaseAndExtent(start, 2, end, 2);

document.execCommand("InsertOrderedList", false, "foo");
</script>