<html> | |
<head> | |
<title>Test for http://bugs.webkit.org/show_bug.cgi?id=13015</title> | |
<script> | |
function test() | |
{ | |
if (location.href.indexOf("?") == -1) { | |
if (window.testRunner) { | |
testRunner.dumpAsText(); | |
testRunner.waitUntilDone(); | |
} | |
location.href = "resources/onunload-form-submit-success.html"; | |
} else { | |
document.getElementById("result").innerText = "FAIL"; | |
if (window.testRunner) | |
testRunner.notifyDone(); | |
} | |
} | |
function handleUnload() | |
{ | |
if (location.href.indexOf("?") == -1) | |
document.myForm.submit(); | |
} | |
</script> | |
</head> | |
<body onload="test()" onunload="handleUnload()"> | |
<form name="myForm"> | |
</form> | |
<p id="result"> | |
Test did not finish. | |
</p> | |
</body> | |
<html> |