<!doctype html>
<title>salvagable state of document after setting unload listener</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
var t = async_test();

var loaded = false;
var unload_fired = false;
var timeout_fired = false;

function start_test() {
  step_timeout(t.step_func(function() {
                             assert_true(unload_fired);
                             assert_false(timeout_fired);
           