OLD | NEW |
(Empty) | |
| 1 <div id=test><iframe src="#test" onload="setTimeout(crash, 0)"></iframe></div> |
| 2 <script> |
| 3 if (window.testRunner) { |
| 4 testRunner.dumpAsText(); |
| 5 testRunner.waitUntilDone(); |
| 6 } |
| 7 var observer = new MutationObserver(function() {}); |
| 8 observer.observe(document.querySelector('#test'), { attributes: true }); |
| 9 function crash() { |
| 10 if (window.top === window) { |
| 11 var iframe = document.querySelector('iframe'); |
| 12 var otherDocument = document.implementation.createDocument("http://www.w3.or
g/1999/xhtml", "html"); |
| 13 otherDocument.adoptNode(iframe.contentDocument.documentElement); |
| 14 otherDocument.documentElement.appendChild(iframe); |
| 15 gc(); |
| 16 setTimeout(function() { |
| 17 console.log('Test passes if it prints this message without crashing'); |
| 18 testRunner.notifyDone(); |
| 19 }, 0); |
| 20 } |
| 21 } |
| 22 </script> |
OLD | NEW |