ddkilzer | 06c6795 | 2007-03-13 03:48:49 +0000 | [diff] [blame] | 1 | <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.org | 03b9c6d | 2012-07-16 01:41:53 +0000 | [diff] [blame] | 8 | if (window.testRunner) { |
| 9 | testRunner.dumpAsText(); |
| 10 | testRunner.waitUntilDone(); |
ddkilzer | 06c6795 | 2007-03-13 03:48:49 +0000 | [diff] [blame] | 11 | } |
darin@apple.com | 0f88bda | 2009-04-02 00:30:50 +0000 | [diff] [blame] | 12 | location.href = "resources/onunload-form-submit-success.html"; |
ddkilzer | 06c6795 | 2007-03-13 03:48:49 +0000 | [diff] [blame] | 13 | } else { |
darin@apple.com | 0f88bda | 2009-04-02 00:30:50 +0000 | [diff] [blame] | 14 | document.getElementById("result").innerText = "FAIL"; |
rniwa@webkit.org | 03b9c6d | 2012-07-16 01:41:53 +0000 | [diff] [blame] | 15 | if (window.testRunner) |
| 16 | testRunner.notifyDone(); |
ddkilzer | 06c6795 | 2007-03-13 03:48:49 +0000 | [diff] [blame] | 17 | } |
| 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> |