| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../js/resources/js-test-pre.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 function test() { | 6 function test() { |
| 7 if (document.location.hash !== '#submitted') { | 7 if (document.location.hash !== '#submitted') { |
| 8 if (window.testRunner) { | 8 if (window.testRunner) { |
| 9 testRunner.dumpAsText(); | 9 testRunner.dumpAsText(); |
| 10 testRunner.setXSSAuditorEnabled(true) | 10 testRunner.setXSSAuditorEnabled(true) |
| 11 testRunner.waitUntilDone(); | 11 testRunner.waitUntilDone(); |
| 12 } | 12 } |
| 13 | 13 |
| 14 var form = document.getElementById('form'); | 14 var form = document.getElementById('form'); |
| 15 // Shouldn't trigger any assertions. | 15 // Shouldn't trigger any assertions. |
| 16 form.submit(); | 16 form.submit(); |
| 17 } else { | 17 } else { |
| 18 testPassed('No assertions raised.'); | 18 testPassed('No assertions raised.'); |
| 19 if (window.testRunner) | 19 if (window.testRunner) |
| 20 testRunner.notifyDone(); | 20 testRunner.notifyDone(); |
| 21 } | 21 } |
| 22 } | 22 } |
| 23 </script> | 23 </script> |
| 24 </head> | 24 </head> |
| 25 <body onload="test()"> | 25 <body onload="test()"> |
| 26 This tests that no assertions are thrown when POST submitting a form. | 26 This tests that no assertions are thrown when POST submitting a form. |
| 27 <form method="post" id="form" action="#submitted"> | 27 <form method="post" id="form" action="#submitted"> |
| 28 <input type="text"> | 28 <input type="text"> |
| 29 </form> | 29 </form> |
| 30 <div id="console"></div> | 30 <div id="console"></div> |
| 31 </body> | 31 </body> |
| 32 </html> | 32 </html> |
| OLD | NEW |