2 <div id=
"description">This tests list creation in an editable context but across non-editable content. Editable content should be pulled into the list and not crash.
</div>
3 <div contenteditable=
"true" id=
"test" style=
"padding: 1em;">
4 Editable paragraph containing a
<span contenteditable=
"false" style=
"background-color: LightGray;">non-editable
</span> in the middle
<br>
5 Another editable paragraph.
7 <button onclick=
"insertList();">Insert List
</button>
8 <script src=
"../../resources/dump-as-markup.js"></script>
10 function insertList() {
11 document
.execCommand('insertunorderedlist', false, '');
14 var s
= window
.getSelection();
15 var div
= document
.getElementById("test");
16 s
.collapse(div
.childNodes
[0], 10);
17 s
.modify("extend", "forward", "line");
19 if (window
.testRunner
) {
21 Markup
.description(document
.getElementById('description').innerText
);