Commit a17a21df authored by tkent@chromium.org's avatar tkent@chromium.org

Fix flakiness of fast/forms/submit-change-fragment.html.

The test timed out in the following case:

1. document.location.search = "?n=v" requests a navigation.
2. Before the navigation happens, onload handler runTest() is executed.
3. document.forms.f.submit() navigates to
    ".../submit-change-fragment.html?n=v#firstaction"
4. Because the original document was ".../submit-change-fragment.html",
   onhashchange handler is NOT called.
5. No one calls testRunner.notifyDone().

This CL moves "?n=v" setting code to runTest(), and do early return to avoid the
form submission without "?n=v".

BUG=521860

Review URL: https://codereview.chromium.org/1302703002

git-svn-id: svn://svn.chromium.org/blink/trunk@200798 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent e9a8f6d6
...@@ -43,7 +43,6 @@ crbug.com/520736 [ Win7 ] media/W3C/video/networkState/networkState_during_progr ...@@ -43,7 +43,6 @@ crbug.com/520736 [ Win7 ] media/W3C/video/networkState/networkState_during_progr
crbug.com/521862 [ Linux Win ] storage/websql/read-transactions-running-concurrently.html [ Failure Pass ] crbug.com/521862 [ Linux Win ] storage/websql/read-transactions-running-concurrently.html [ Failure Pass ]
crbug.com/521861 [ Debug ] media/track/tracklist-is-reachable-no-crash.html [ Crash Pass ] crbug.com/521861 [ Debug ] media/track/tracklist-is-reachable-no-crash.html [ Crash Pass ]
crbug.com/521860 fast/forms/submit-change-fragment.html [ Pass Timeout ]
crbug.com/521859 http/tests/navigatorconnect/postmessage-from-worker.html [ Pass Timeout ] crbug.com/521859 http/tests/navigatorconnect/postmessage-from-worker.html [ Pass Timeout ]
crbug.com/521858 [ Win7 ] http/tests/security/media-element-audio-source-node-same-origin.html [ Failure Pass ] crbug.com/521858 [ Win7 ] http/tests/security/media-element-audio-source-node-same-origin.html [ Failure Pass ]
crbug.com/521857 [ Win7 ] imported/web-platform-tests/IndexedDB/idbdatabase_createObjectStore10-1000ends.htm [ Pass Timeout ] crbug.com/521857 [ Win7 ] imported/web-platform-tests/IndexedDB/idbdatabase_createObjectStore10-1000ends.htm [ Pass Timeout ]
......
...@@ -5,10 +5,11 @@ if (window.testRunner) { ...@@ -5,10 +5,11 @@ if (window.testRunner) {
testRunner.waitUntilDone(); testRunner.waitUntilDone();
} }
if (document.location.href.indexOf("n=v") == -1)
document.location.search = "?n=v";
function runTest() { function runTest() {
if (document.location.href.indexOf("n=v") == -1) {
document.location.search = "?n=v";
return;
}
document.forms.f.action="#firstaction"; document.forms.f.action="#firstaction";
document.forms.f.submit(); document.forms.f.submit();
document.forms.f.action="#secondaction"; document.forms.f.action="#secondaction";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment