test_bug529819.html 1003 B

123456789101112131415161718192021222324252627282930313233
  1. <!DOCTYPE HTML>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=529819
  5. -->
  6. <head>
  7. <title>Test for Bug 529819</title>
  8. <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  9. <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  10. </head>
  11. <body>
  12. <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=529819">Mozilla Bug 529819</a>
  13. <p id="display"></p>
  14. <div id="content" style="display: none">
  15. <form id="form">
  16. <input name="foo" id="foo">
  17. <input name="bar" type="radio">
  18. <input name="bar" id="bar" type="radio">
  19. </form>
  20. </div>
  21. <pre id="test">
  22. <script type="application/javascript">
  23. /** Test for Bug 529819 **/
  24. is($("form").elements["foo"] instanceof HTMLInputElement, true, "Should have an element here");
  25. is($("form").elements["bar"] instanceof HTMLInputElement, false, "Should have a list here");
  26. is($("form").elements["bar"].length, 2, "Should have a list with two elements here");
  27. </script>
  28. </pre>
  29. </body>
  30. </html>