test_bug353415-2.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Test</title>
  5. <script type="text/javascript" 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. <table>
  11. <tr><td>
  12. <input type="text" name="field1" value="teststring"><br>
  13. <input type="radio" name="field2" value="0" checked> 0
  14. <input type="radio" name="field3" value="1"> 1<br>
  15. <input type="checkbox" name="field4" value="1" checked> 1
  16. <input type="checkbox" name="field5" value="2"> 2
  17. <input type="checkbox" name="field6" value="3" checked> 3
  18. <select name="field7">
  19. <option value="1">1</option>
  20. <option value="2" selected>2</option>
  21. <option value="3">3</option>
  22. <option value="4">4</option>
  23. </select>
  24. <input name="field8" value="8">
  25. <input name="field9" value="9">
  26. <input type="image" name="field10">
  27. <label name="field11"></label>
  28. <input name="field12">
  29. <input type="button" name="field13" value="button">
  30. <input type="hidden" name="field14" value="14">
  31. </td>
  32. <input type="text" name="field1-2" value="teststring"><br>
  33. <input type="radio" name="field2-2" value="0" checked> 0
  34. <input type="radio" name="field3-2" value="1"> 1<br>
  35. <input type="checkbox" name="field4-2" value="1" checked> 1
  36. <input type="checkbox" name="field5-2" value="2"> 2
  37. <input type="checkbox" name="field6-2" value="3" checked> 3
  38. <select name="field7-2">
  39. <option value="1">1</option>
  40. <option value="2" selected>2</option>
  41. <option value="3">3</option>
  42. <option value="4">4</option>
  43. </select>
  44. <input name="field8-2" value="8">
  45. <input name="field9-2" value="9">
  46. <input type="image" name="field10-2">
  47. <label name="field11-2"></label>
  48. <input name="field12-2">
  49. <input type="button" name="field13-2" value="button">
  50. <input type="hidden" name="field14-2" value="14">
  51. </tr>
  52. </table>
  53. </form>
  54. <script>
  55. SimpleTest.waitForExplicitFinish();
  56. addLoadEvent(function() {
  57. document.getElementsByName('submit_frame')[0].onload = function() {
  58. is(frames['submit_frame'].location.href, "http://mochi.test:8888/blah?field1-2=teststring&field2-2=0&field4-2=1&field6-2=3&field7-2=2&field8-2=8&field9-2=9&field12-2=&field1=teststring&field2=0&field4=1&field6=3&field7=2&field8=8&field9=9&field12=&field14=14&field14-2=14", "Submit string was correct.");
  59. SimpleTest.finish();
  60. };
  61. document.forms[0].submit();
  62. });
  63. </script>
  64. </body>
  65. </html>