| OLD | NEW | 
|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> | 
| 2 <html> | 2 <html> | 
| 3 <head> | 3 <head> | 
| 4 <script> | 4 <script> | 
| 5 if (window.layoutTestController) | 5 if (window.layoutTestController) | 
| 6     layoutTestController.dumpAsText(); | 6     layoutTestController.dumpAsText(); | 
| 7 | 7 | 
| 8 function runTest() | 8 function runTest() | 
| 9 { | 9 { | 
| 10     var iframeElement = document.getElementById('iframe1'); | 10     var iframeElement = document.getElementById('iframe1'); | 
| 11     var iframeDocument = iframeElement.contentDocument; | 11     var iframeDocument = iframeElement.contentDocument; | 
| 12     var iframeDocumentRoot = iframeDocument.documentElement; | 12     var iframeDocumentRoot = iframeDocument.documentElement; | 
| 13 | 13 | 
| 14     var selection = window.getSelection(); | 14     var selection = window.getSelection(); | 
| 15     var range = document.createRange(); | 15     var range = document.createRange(); | 
| 16     selection.addRange(range); | 16     selection.addRange(range); | 
| 17     range.selectNode(iframeDocumentRoot); | 17     range.selectNode(iframeDocumentRoot); | 
| 18     selection.addRange(range); | 18     selection.addRange(range); | 
| 19     iframeDocument.removeChild(iframeDocumentRoot); | 19     iframeDocument.removeChild(iframeDocumentRoot); | 
| 20 } | 20 } | 
| 21 </script> | 21 </script> | 
| 22 </head> | 22 </head> | 
| 23 <body> | 23 <body> | 
| 24 Test passes if it does not crash. | 24 Test passes if it does not crash. | 
| 25 <iframe id="iframe1" onload="runTest()"></iframe> | 25 <iframe id="iframe1" onload="runTest()"></iframe> | 
| 26 </body> | 26 </body> | 
| 27 </html> | 27 </html> | 
| OLD | NEW | 
|---|