3 <p>Test for
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=21060">bug
21060</a>:
4 Range#surroundContents incorrectly throws BAD_BOUNDARYPOINTS_ERR.
</p>
6 <p style=
"visibility:hidden">Hello,
<em>Range
</em> world!
</p>
8 <script type=
"text/javascript">
10 testRunner
.dumpAsText();
13 var range
= document
.createRange();
14 var em
= document
.getElementsByTagName('em')[0];
16 var strong
= document
.createElement('strong');
18 range
.surroundContents(strong
);
19 var markup
= document
.getElementsByTagName("p")[1].innerHTML
;
20 document
.write((markup
== 'Hello, <strong><em>Range</em></strong> world!') ?
21 "PASS" : ("FAIL: incorrect resulting markup, '" + markup
.replace(/</g
, "<") + "'"));
23 document
.write("FAIL: " + ex
);