Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / dom / Range / range-selection-across-documents-crash.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 if (window.testRunner)
6     testRunner.dumpAsText();
7
8 function runTest()
9 {
10     var iframeElement = document.getElementById('iframe1');
11     var iframeDocument = iframeElement.contentDocument;
12     var iframeDocumentRoot = iframeDocument.documentElement;
13
14     var selection = window.getSelection();
15     var range = document.createRange();
16     selection.addRange(range);
17     range.selectNode(iframeDocumentRoot);
18     selection.addRange(range);
19     iframeDocument.removeChild(iframeDocumentRoot);
20 }
21 </script>
22 </head>
23 <body>
24 Test passes if it does not crash.
25 <iframe id="iframe1" onload="runTest()"></iframe>
26 </body>
27 </html>