document.write inside onunload handler should not cause crash.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
iframe loaded successfully
PASS "Done" is event.data
iframe unloaded successfully
PASS successfullyParsed is true
TEST COMPLETE
Test passes if it doesn't crash