| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <!-- Passes if doesn't crash --> |
| 3 <head> |
| 4 <script> |
| 5 if (window.testRunner) |
| 6 testRunner.dumpAsText(); |
| 7 |
| 8 document.getElementsByTagName('script')[0].remove(); |
| 9 document.addEventListener('selectionchange', function() { |
| 10 getSelection().deleteFromDocument(); |
| 11 }); |
| 12 onload = function() { |
| 13 var newBody = document.body; |
| 14 // This will create a new <body> and an empty <head>. |
| 15 newBody.outerHTML = ''; |
| 16 newBody.className = 'new-body'; |
| 17 document.documentElement.insertBefore(newBody, document.head.nextSibling); |
| 18 document.execCommand("SelectAll", false); |
| 19 document.getElementsByTagName('body')[1].outerHTML = ''; |
| 20 getSelection().getRangeAt(0).extractContents(); |
| 21 }; |
| 22 </script> |
| 23 <style> |
| 24 * { -webkit-appearance: radio } |
| 25 .new-body { backface-visibility: hidden } |
| 26 </style> |
| 27 </head> |
| OLD | NEW |