4 if (window
.testRunner
) {
5 testRunner
.dumpAsText();
6 testRunner
.waitUntilDone();
11 var htmlElement
= document
.firstChild
;
13 var staleRange
= document
.createRange();
15 // Delete document.body:
16 var range
= document
.createRange();
17 range
.setEndAfter(htmlElement
);
18 range
.deleteContents();
20 var selection
= window
.getSelection();
21 selection
.addRange(staleRange
);
22 selection
.modify("extend", "forward", "documentboundary"); // WebKit crashed here.
24 // Recreate the HTML element to show 'PASS'.
25 document
.appendChild(document
.createElement('html'));
26 document
.firstChild
.innerHTML
= '<body>PASS</body>';
27 if (window
.testRunner
)
28 testRunner
.notifyDone();
32 <body onload=
"test()">