| OLD | NEW |
| 1 <script> | 1 <script> |
| 2 if (window.testRunner) | 2 if (window.testRunner) |
| 3 testRunner.dumpAsText(); | 3 testRunner.dumpAsText(); |
| 4 | 4 |
| 5 var iframe = null; | 5 var iframe = null; |
| 6 | 6 |
| 7 function start() { | 7 function start() { |
| 8 iframe = document.createElement('iframe'); | 8 iframe = document.createElement('iframe'); |
| 9 iframe.setAttribute('marginwidth', 1); | 9 iframe.setAttribute('marginwidth', 1); |
| 10 document.body.appendChild(iframe); | 10 document.body.appendChild(iframe); |
| 11 | 11 |
| 12 var bodyInFrame = document.createElement('body'); | 12 var bodyInFrame = document.createElement('body'); |
| 13 bodyInFrame.addEventListener('DOMSubtreeModified', removeIframe); | 13 bodyInFrame.addEventListener('DOMSubtreeModified', removeIframe); |
| 14 iframe.contentDocument.documentElement.appendChild(bodyInFrame); | 14 iframe.contentDocument.documentElement.appendChild(bodyInFrame); |
| 15 document.body.innerHTML = 'PASS if not crashed.'; | 15 document.body.innerHTML = 'PASS if not crashed.'; |
| 16 } | 16 } |
| 17 | 17 |
| 18 function removeIframe() { | 18 function removeIframe() { |
| 19 iframe.parentNode.removeChild(iframe); | 19 iframe.parentNode.removeChild(iframe); |
| 20 iframe = null; | 20 iframe = null; |
| 21 gc(); | 21 gc(); |
| 22 } | 22 } |
| 23 </script> | 23 </script> |
| 24 <body onload="start()"> | 24 <body onload="start()"> |
| 25 </body> | 25 </body> |
| OLD | NEW |