| <!DOCTYPE> |
| <html> |
| <body> |
| <script src="../../resources/dump-as-markup.js"></script> |
| <div contentEditable id="test"> |
| <span id="start">start</span> |
| editable-1 |
| <div contentEditable="false"> |
| <style>#end { color: red; }</style> |
| <link type="foo" href="bar"> |
| uneditable |
| </div> |
| editable-2 |
| <span id="end">end</span> |
| </div> |
| <script> |
| Markup.description('Test that having a non-editable style and link elements does not cause a crash'); |
| |
| function $(id) { return document.getElementById(id); } |
| |
| var range = document.createRange(); |
| range.setStart($('start'), 0); |
| range.setEnd($('end'), NaN); |
| |
| getSelection().addRange(range); |
| |
| document.execCommand('Delete', null, ''); |
| |
| Markup.dump('test'); |
| |
| </script> |
| </body> |
| </html> |