OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../../../resources/js-test.js"></script> |
| 4 </head> |
| 5 <body> |
| 6 <div id='test'> |
| 7 <p id='start'>start</p> |
| 8 <p id='end'>end</p> |
| 9 </div> |
| 10 <script> |
| 11 var range = document.createRange(); |
| 12 var start = document.getElementById('start'); |
| 13 var end = document.getElementById('end'); |
| 14 range.setStart(start.firstChild, 0); |
| 15 range.setEnd(end.firstChild, 0); |
| 16 |
| 17 shouldThrow("range.surroundContents(start)", '"InvalidStateError: Failed to exec
ute \'surroundContents\' on \'Range\': The Range has partially selected a non-Te
xt node."'); |
| 18 |
| 19 if (window.testRunner) |
| 20 document.getElementById('test').outerHTML = ''; |
| 21 </script> |
| 22 </body> |
| 23 </html> |
OLD | NEW |