chromium/third_party/blink/web_tests/fast/events/onunload-window-property.html

<html>

<head>
<script>

if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

function unload()
{
    alert("unload");
}

function load()
{
    window.onunload = unload;
    location = "resources/onunload-single-alert-success.html";
}

</script>
</head>

<body onload="load()">
start document
</body>

</html>