Chromium Code Reviews| Index: LayoutTests/fast/forms/form-submission-cancelable.html |
| diff --git a/LayoutTests/fast/forms/form-submission-cancelable.html b/LayoutTests/fast/forms/form-submission-cancelable.html |
| index 9a41a572c7b79f01aa7122ce48873c5f97782a47..b52c4430a898ebd6149fc89911233656c06feb2a 100644 |
| --- a/LayoutTests/fast/forms/form-submission-cancelable.html |
| +++ b/LayoutTests/fast/forms/form-submission-cancelable.html |
| @@ -17,6 +17,16 @@ |
| <script> |
| description('Test that form submit within onsubmit event handlers are not delayed and sends the form data when invoked'); |
| var count = 2; |
| + |
| +function asyncTest(query) { |
| + if (query === '?query=AAA' || query === '?query=BBB') { |
|
tkent
2014/03/17 20:56:19
Did you run this test? Shouldn't '?query=BBB' be
Habib Virji
2014/03/18 08:49:04
Done. Apologise, I did test was query1, but by mis
|
| + if (--count == 0) { |
| + testPassed('Both query events received, with correct values: AAA and BBB'); |
| + finishJSTest(); |
| + } |
| + } |
| +} |
| + |
| document.forms[0].onsubmit = function (event) { |
| document.forms[0].submit(); |
| document.forms[0].children.query.value = 'BBB'; |
| @@ -30,20 +40,18 @@ document.forms[1].onsubmit = function (event) { |
| } |
| document.getElementById('target').onload = function(event) { |
| - shouldBeEqualToString('event.target.contentWindow.location.search', '?query=AAA'); |
| - if (--count == 0) |
| - finishJSTest(); |
| + // This should return back query AAA |
| + asyncTest(event.target.contentWindow.location.search); |
| } |
| document.getElementById('target1').onload = function(event) { |
| - shouldBeEqualToString('event.target.contentWindow.location.search', '?query1=BBB'); |
| - if (--count == 0) |
| - finishJSTest(); |
| + // This should return back query BBB |
| + asyncTest(event.target.contentWindow.location.search); |
| } |
| window.onload = function() { |
| - document.getElementById('submitButton1').click(); |
| document.getElementById('submitButton').click(); |
| + document.getElementById('submitButton1').click(); |
| } |
| if (window.testRunner) |