Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../../resources/js-test.js"></script> | |
| 5 </head> | |
| 6 <body> | |
| 7 <form method="GET" action="data:text/html, | |
| 8 <script> | |
| 9 window.onload= function() { | |
| 10 var query=window.location.search; | |
| 11 console.log(query); | |
| 12 console.log(query.indexOf('query=AAA') == 1); | |
|
keishi
2014/02/28 10:57:48
We should use js-test.js shouldBe* methods if poss
Habib Virji
2014/03/04 14:37:53
Done.
| |
| 13 } | |
| 14 </script>" target="target"> | |
| 15 <input name="query" value="AAA" /> | |
| 16 <input type="submit" id="submitButton"/> | |
| 17 </form> | |
| 18 | |
| 19 <form method="GET" action="data:text/html, | |
| 20 <script> | |
| 21 window.onload= function() { | |
| 22 var query=window.location.search; | |
| 23 console.log(query); | |
| 24 console.log(query.indexOf('query1=BBB') == 1); | |
| 25 window.testRunner && testRunner.notifyDone(); | |
| 26 } | |
| 27 </script>" target="target1"> | |
| 28 <input name="query1" value="AAA" /> | |
| 29 <input type="submit" id="submitButton1"/> | |
| 30 </form> | |
| 31 <script> | |
| 32 description("Test for the form submit, when prevented should not submit the form"); | |
|
keishi
2014/02/28 10:57:48
This bug is not about respecting the return value
keishi
2014/02/28 10:57:48
nit: We should unify string literals to single quo
Habib Virji
2014/03/04 14:37:53
Done.
| |
| 33 if (window.testRunner) | |
| 34 { | |
|
keishi
2014/02/28 10:57:48
nit: No line break before braces in JavaScript.
Habib Virji
2014/03/04 14:37:53
Done.
| |
| 35 testRunner.dumpAsText(); | |
|
keishi
2014/02/28 10:57:48
We have js-test.js so this is already done.
Habib Virji
2014/03/04 14:37:53
Done.
| |
| 36 testRunner.setCanOpenWindows(); | |
|
keishi
2014/02/28 10:57:48
I think we don't need these lines? (setCanOpenWind
Habib Virji
2014/03/04 14:37:53
Done.
| |
| 37 testRunner.setPopupBlockingEnabled(true); | |
| 38 testRunner.setCloseRemainingWindowsWhenComplete(true); | |
| 39 testRunner.waitUntilDone(); | |
|
keishi
2014/02/28 10:57:48
We have js-test.js so we can use
window.jsTestIsAs
Habib Virji
2014/03/04 14:37:53
Done.
| |
| 40 } | |
| 41 | |
| 42 document.forms[0].onsubmit = function (event) | |
| 43 { | |
| 44 document.forms[0].submit(); | |
| 45 document.forms[0].children.query.value = 'BBB'; | |
| 46 return false; | |
| 47 } | |
| 48 | |
| 49 document.forms[1].onsubmit = function (event) | |
| 50 { | |
| 51 document.forms[1].submit(); | |
| 52 document.forms[1].children.query1.value = 'BBB'; | |
| 53 return true; | |
| 54 } | |
| 55 | |
| 56 window.onload = function() | |
| 57 { | |
| 58 document.getElementById('submitButton').click(); | |
| 59 document.getElementById('submitButton1').click(); | |
| 60 } | |
| 61 | |
| 62 </script> | |
| 63 | |
| 64 <iframe id="target"></iframe> | |
| 65 <iframe id="target1"></iframe> | |
| 66 </body> | |
| 67 </html> | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| OLD | NEW |