3 <script src='../../resources/js-test.js'
></script>
5 description('document.write inside onunload handler should not cause crash.');
8 window
.onload = function() {
9 var iframe
= document
.createElement('iframe');
11 iframe
.addEventListener('load', function() {
14 debug('iframe loaded successfully');
15 iframe
.src
= 'about:blank';
18 window
.addEventListener('message', function() {
19 shouldBe('"Done"', 'event.data');
20 debug('iframe unloaded successfully');
21 document
.body
.removeChild(iframe
);
25 iframe
.src
= 'resources/document-open-in-unload-inner.html';
26 document
.body
.appendChild(iframe
);
29 <p>Test passes if it doesn't crash
</p>