Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / inserting / break-out-of-nested-lists.html
bloba630cca15d9a75ef8ae35c8980ae5948d2be07ad
1 <!DOCTYPE>
2 <html>
3 <body>
4 <p id="description">Tests breaking out of empty list item in case of nested lists.</p>
5 <div contenteditable>
6 <ol>
7 <li>one</li>
8 <ul>
9 <li id="li">1</li>
10 <li>2</li>
11 </ul>
12 <li>two</li>
13 </ol>
14 </div>
15 <script src="../../resources/dump-as-markup.js"></script>
16 <script>
17 var li = document.getElementById("li");
18 var selection = window.getSelection();
19 selection.collapse(li, li.childNodes[0].length);
20 document.execCommand('InsertText', false, '\n'); //Split the inner list into two
21 document.execCommand('InsertText', false, '\n'); //Break out of the first inner list
22 document.execCommand('InsertText', false, '\n'); //Break out of the outer list
23 document.execCommand('InsertText', false, 'foo');
24 Markup.description(document.getElementById('description').textContent);
25 Markup.dump(document.querySelector('div'));
26 </script>
27 </body>
28 </html>