3 <script src=
"../../../resources/js-test.js"></script>
7 <p id='start'
>start
</p>
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);
17 shouldThrow("range.surroundContents(start)", '"InvalidStateError: Failed to execute \'surroundContents\' on \'Range\': The Range has partially selected a non-Text node."');
19 if (window
.testRunner
)
20 document
.getElementById('test').outerHTML
= '';