blob: c414698f8a994a389438c30170548ee9610a7fd2 [file] [log] [blame]
ddkilzer06c67952007-03-13 03:48:49 +00001<html>
2<head>
3 <title>Test for http://bugs.webkit.org/show_bug.cgi?id=13015</title>
4 <script>
5 function test()
6 {
7 if (location.href.indexOf("?") == -1) {
rniwa@webkit.org03b9c6d2012-07-16 01:41:53 +00008 if (window.testRunner) {
9 testRunner.dumpAsText();
10 testRunner.waitUntilDone();
ddkilzer06c67952007-03-13 03:48:49 +000011 }
darin@apple.com0f88bda2009-04-02 00:30:50 +000012 location.href = "resources/onunload-form-submit-success.html";
ddkilzer06c67952007-03-13 03:48:49 +000013 } else {
darin@apple.com0f88bda2009-04-02 00:30:50 +000014 document.getElementById("result").innerText = "FAIL";
rniwa@webkit.org03b9c6d2012-07-16 01:41:53 +000015 if (window.testRunner)
16 testRunner.notifyDone();
ddkilzer06c67952007-03-13 03:48:49 +000017 }
18 }
19
20 function handleUnload()
21 {
22 if (location.href.indexOf("?") == -1)
23 document.myForm.submit();
24 }
25 </script>
26</head>
27<body onload="test()" onunload="handleUnload()">
28 <form name="myForm">
29 </form>
30 <p id="result">
31 Test did not finish.
32 </p>
33</body>
34<html>