Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / execCommand / insert-html-to-document-element-crash.html
blob7c4c671a9e8027a0c3250120e6e0d2c73e7852c0
1 <!DOCTYPE html>
2 <head>
3 <script>
4 if (window.testRunner)
5 testRunner.dumpAsText();
7 onload = function() {
8 // Make documentElement to P element without HTML and BODY.
9 var htmlElement = document.documentElement;
10 var target = document.getElementById('target');
11 document.replaceChild(target, htmlElement);
13 document.designMode = 'on';
14 window.getSelection().collapse(target, 0);
15 document.execCommand('InsertHTML', false, '<pre></pre>');
17 // Here, document.documentElement is null.
18 document.write('PASS if Blink doesn\'t crash.');
20 </script>
21 </head>
22 <body>
23 <p id="target"></p>
24 </body>
25 </html>