| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <script src="../../resources/testharness.js"></script> | |
| 3 <script src="../../resources/testharnessreport.js"></script> | |
| 4 <body> | |
| 5 <form action="javascript: redirect()"></form> | |
| 6 <script> | |
| 7 var f1 = document.forms[0]; | |
| 8 test(function() { | |
| 9 f1.parentNode.removeChild(f1); | |
| 10 f1.submit(); | |
| 11 }, 'Submitting a form that has been removed.'); | |
| 12 | |
| 13 var f2 = document.createElement('form'); | |
| 14 f2.action = "javascript: redirect()"; | |
| 15 test(function() { | |
| 16 f2.submit(); | |
| 17 }, 'Submitting a form that has never been attached to the document.'); | |
| 18 | |
| 19 function redirect() { | |
| 20 assert_unreached('A form should never be submitted if it is not attached to th
e document.'); | |
| 21 } | |
| 22 | |
| 23 </script> | |
| 24 </body> | |
| OLD | NEW |