chromium/third_party/blink/web_tests/fast/events/onunload.html

<html>
<body onunload="unload()" onload="load()">
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

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

function unload()
{
    alert("unload");
}
</script>
start document
</body>
</html>