Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(718)

Side by Side Diff: LayoutTests/fast/forms/submit-change-fragment.html

Issue 1302703002: Fix flakiness of fast/forms/submit-change-fragment.html. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <script> 2 <script>
3 if (window.testRunner) { 3 if (window.testRunner) {
4 testRunner.dumpAsText(); 4 testRunner.dumpAsText();
5 testRunner.waitUntilDone(); 5 testRunner.waitUntilDone();
6 } 6 }
7 7
8 if (document.location.href.indexOf("n=v") == -1)
9 document.location.search = "?n=v";
10
11 function runTest() { 8 function runTest() {
9 if (document.location.href.indexOf("n=v") == -1) {
10 document.location.search = "?n=v";
11 return;
12 }
12 document.forms.f.action="#firstaction"; 13 document.forms.f.action="#firstaction";
13 document.forms.f.submit(); 14 document.forms.f.submit();
14 document.forms.f.action="#secondaction"; 15 document.forms.f.action="#secondaction";
15 } 16 }
16 17
17 function hashChanged() { 18 function hashChanged() {
18 if (document.location.href.indexOf("firstaction") != -1) { 19 if (document.location.href.indexOf("firstaction") != -1) {
19 document.getElementById("console").innerHTML="PASS"; 20 document.getElementById("console").innerHTML="PASS";
20 if (window.testRunner) 21 if (window.testRunner)
21 testRunner.notifyDone(); 22 testRunner.notifyDone();
22 } 23 }
23 } 24 }
24 25
25 26
26 </script> 27 </script>
27 <body onhashchange="hashChanged();" onload="runTest();"> 28 <body onhashchange="hashChanged();" onload="runTest();">
28 <div><a href="https://bugs.webkit.org/show_bug.cgi?id=20342">https://bugs.webkit .org/show_bug.cgi?id=20342</a></div> 29 <div><a href="https://bugs.webkit.org/show_bug.cgi?id=20342">https://bugs.webkit .org/show_bug.cgi?id=20342</a></div>
29 <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, a nd the onload handler is not called again.</p> 30 <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, a nd the onload handler is not called again.</p>
30 <p>Also test that changing the form action after the form was submitted has no e ffect.</p> 31 <p>Also test that changing the form action after the form was submitted has no e ffect.</p>
31 32
32 <form name="f" method="GET" action="#action"><input name="n" value="v"></form> 33 <form name="f" method="GET" action="#action"><input name="n" value="v"></form>
33 <div id="console">FAIL</div> 34 <div id="console">FAIL</div>
34 <script> 35 <script>
35 </script> 36 </script>
36 </body> 37 </body>
37 </html> 38 </html>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698