3 <script src=
"../../../resources/js-test.js"></script>
7 <p id='start'
>start
</p>
8 <iframe id='test'
></iframe>
12 var range
= document
.createRange();
13 var start
= document
.getElementById('start');
14 range
.setStart(start
.firstChild
, 0);
15 range
.setEnd(start
.firstChild
, 0);
18 var srcElement
= ev
.srcElement
;
19 range
.surroundContents(document
.getElementById('end'));
20 srcElement
.outerHTML
= '';
22 document
.addEventListener("load", loaded
, true);
24 var testFrame
= document
.getElementById('test');
25 shouldThrow("range.surroundContents(testFrame)", '"HierarchyRequestError: Failed to execute \'surroundContents\' on \'Range\': This operation would set range\'s end to parent with new offset, but there\'s no parent into which to continue."');
27 if (window
.testRunner
)
28 document
.getElementById('container').outerHTML
= '';