ap | 47ae5ec | 2006-01-06 15:50:53 +0000 | [diff] [blame] | 1 | <html> |
| 2 | <head> |
| 3 | <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> |
| 4 | <title>Regression test for bug 5291</title> |
| 5 | </head> |
| 6 | <body> |
| 7 | <form method="get" enctype="multipart/form-data" action="?" name=f> |
| 8 | <input type="hidden" name="hidden" value="I am hidden"> |
| 9 | <input type="submit" value="press me"> |
| 10 | </form> |
| 11 | <script> |
rniwa@webkit.org | ea3cf92 | 2012-06-22 06:52:33 +0000 | [diff] [blame] | 12 | if (window.testRunner) { |
| 13 | testRunner.dumpAsText(); |
| 14 | testRunner.waitUntilDone(); |
ap | 47ae5ec | 2006-01-06 15:50:53 +0000 | [diff] [blame] | 15 | } |
| 16 | |
| 17 | if (document.URL.substring(0, 4) == "file") { |
| 18 | |
| 19 | if (document.URL.indexOf('?') == -1) { |
| 20 | |
| 21 | document.f.submit(); |
| 22 | |
| 23 | } else { |
| 24 | |
| 25 | if (document.URL.substring(document.URL.indexOf('?')+1, document.URL.length) == "hidden=I+am+hidden") |
| 26 | document.write("<p>Success</p>"); |
| 27 | else |
| 28 | document.write("<p>Failure</p>"); |
| 29 | |
rniwa@webkit.org | ea3cf92 | 2012-06-22 06:52:33 +0000 | [diff] [blame] | 30 | if (window.testRunner) |
| 31 | testRunner.notifyDone(); |
ap | 47ae5ec | 2006-01-06 15:50:53 +0000 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | } else { |
| 35 | |
| 36 | document.write("<p>This test doesn't work directly from bugzilla, please save it to a local file first.</p>"); |
| 37 | } |
| 38 | </script> |
| 39 | </body> |
| 40 | </html> |