| <!DOCTYPE> |
| <html> |
| <body> |
| <p id="description">Tests breaking out of empty list item in case of nested lists.</p> |
| <div contenteditable> |
| <ol> |
| <li>one</li> |
| <ul> |
| <li id="li">1</li> |
| <li>2</li> |
| </ul> |
| <li>two</li> |
| </ol> |
| </div> |
| <script src="../../resources/dump-as-markup.js"></script> |
| <script> |
| var li = document.getElementById("li"); |
| var selection = window.getSelection(); |
| selection.collapse(li, li.childNodes[0].length); |
| document.execCommand('InsertText', false, '\n'); //Split the inner list into two |
| document.execCommand('InsertText', false, '\n'); //Break out of the first inner list |
| document.execCommand('InsertText', false, '\n'); //Break out of the outer list |
| document.execCommand('InsertText', false, 'foo'); |
| Markup.description(document.getElementById('description').textContent); |
| Markup.dump(document.querySelector('div')); |
| </script> |
| </body> |
| </html> |
| |