test_bug353415-1.html (1368B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>Test</title> 5 <script src="/tests/SimpleTest/SimpleTest.js"></script> 6 </head> 7 <body> 8 <iframe name="submit_frame"></iframe> 9 <form method="get" id="form1" target="submit_frame" action="../../../../../blah"> 10 <input type="text" name="field1" value="teststring"><br> 11 <input type="radio" name="field2" value="0" checked> 0 12 <input type="radio" name="field3" value="1"> 1<br> 13 <input type="checkbox" name="field4" value="1" checked> 1 14 <input type="checkbox" name="field5" value="2"> 2 15 <input type="checkbox" name="field6" value="3" checked> 3 16 <select name="field7"> 17 <option value="1">1</option> 18 <option value="2" selected>2</option> 19 <option value="3">3</option> 20 <option value="4">4</option> 21 </select> 22 <input name="field8" value="8"> 23 <input name="field9" value="9"> 24 <input type="image" name="field10"> 25 <label name="field11"> 26 <input name="field12"> 27 <input type="button" name="field13" value="button"> 28 </form> 29 <script> 30 SimpleTest.waitForExplicitFinish(); 31 32 addLoadEvent(function() { 33 document.getElementsByName('submit_frame')[0].onload = function() { 34 is(frames.submit_frame.location.href, `${location.origin}/blah?field1=teststring&field2=0&field4=1&field6=3&field7=2&field8=8&field9=9&field12=`, "Submit string was correct."); 35 SimpleTest.finish(); 36 }; 37 38 document.forms[0].submit(); 39 }); 40 </script> 41 </body> 42 </html>