| <html> | |
| <base href="http://www.example.com/failure/"> | |
| <head> | |
| <title>Submitting forms with no action attribute</title> | |
| </head> | |
| <body> | |
| <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=17042">bug 17042</a>: Forms without actions and a base tag submit incorrectly.</p> | |
| <form name="f" method="get"> | |
| <input type="submit" value="Test"/> | |
| </form> | |
| <script> | |
| if (window.testRunner) { | |
| testRunner.dumpAsText(); | |
| testRunner.waitUntilDone(); | |
| } | |
| if (document.URL.indexOf('?') == -1) { | |
| document.f.submit(); | |
| } else { | |
| if (unescape(document.URL.substring(document.URL.indexOf('?')+1, document.URL.length)) == "") | |
| document.write("<p>Success</p>"); | |
| else | |
| document.write("<p>Failure</p>"); | |
| if (window.testRunner) | |
| testRunner.notifyDone(); | |
| } | |
| </script> | |
| </body> | |
| </html> |