Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / execCommand / insert-list-with-noneditable-content.html
bloba535fc7a47cfccbf1c78711d9ceea2af422add30
1 <!DOCTYPE html>
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.
6 </div>
7 <button onclick="insertList();">Insert List</button>
8 <script src="../../resources/dump-as-markup.js"></script>
9 <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) {
20 insertList();
21 Markup.description(document.getElementById('description').innerText);
22 Markup.dump(div);
24 </script>