blob: fcfb66192a2e1d92a92eef2911ce1856fc4b6849 [file] [log] [blame]
<html>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
if (document.location.href.indexOf("n=v") == -1)
document.location.search = "?n=v";
function runTest() {
document.forms.f.action="#firstaction";
document.forms.f.submit();
document.forms.f.action="#secondaction";
}
function hashChanged() {
if (document.location.href.indexOf("firstaction") != -1) {
document.getElementById("console").innerHTML="PASS";
if (window.testRunner)
testRunner.notifyDone();
}
}
</script>
<body onhashchange="hashChanged();" onload="runTest();">
<div><a href="https://bugs.webkit.org/show_bug.cgi?id=20342">https://bugs.webkit.org/show_bug.cgi?id=20342</a></div>
<p>Test that when the form method is get, and the form action is the same as the current location url, but with different fragment, we do not reload the page, and the onload handler is not called again.</p>
<p>Also test that changing the form action after the form was submitted has no effect.</p>
<form name="f" method="GET" action="#action"><input name="n" value="v"></form>
<div id="console">FAIL</div>
<script>
</script>
</body>
</html>