Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / execCommand / insert-list-with-noneditable-content.html
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, '');
12 }
13
14 var s = window.getSelection();
15 var div = document.getElementById("test");
16 s.collapse(div.childNodes[0], 10);
17 s.modify("extend", "forward", "line");
18
19 if (window.testRunner) {
20   insertList();
21   Markup.description(document.getElementById('description').innerText);
22   Markup.dump(div);
23 }
24 </script>