test_bug1013316.html 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <!DOCTYPE HTML>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=1013316
  5. -->
  6. <head>
  7. <meta charset="utf-8">
  8. <title>Test for Bug 1013316</title>
  9. <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  10. <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  11. <script type="application/javascript">
  12. /** Test for Bug 1013316 **/
  13. SimpleTest.waitForExplicitFinish();
  14. addLoadEvent(function() {
  15. is(Object.keys(document.all).length, 15, "We have 15 indexed props");
  16. var props = Object.getOwnPropertyNames(document.all);
  17. is(props.length, 20, "Should have five names");
  18. is(props[15], "display", "display first");
  19. is(props[16], "content", "content second");
  20. is(props[17], "bar", "bar third");
  21. is(props[18], "foo", "foo fourth");
  22. is(props[19], "test", "test fifth");
  23. is(Object.keys(document.images).length, 2, "We have 2 indexed props");
  24. props = Object.getOwnPropertyNames(document.images);
  25. is(props.length, 5, "Should have 3 names");
  26. is(props[2], "display", "display first on document.images");
  27. is(props[3], "bar", "bar second on document.images");
  28. is(props[4], "foo", "foo third on document.images");
  29. SimpleTest.finish();
  30. })
  31. </script>
  32. </head>
  33. <body>
  34. <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1013316">Mozilla Bug 1013316</a>
  35. <p id="display"></p>
  36. <div id="content" style="display: none">
  37. <img id="display">
  38. <img name="foo" id="bar">
  39. <div name="baz">
  40. </div>
  41. <pre id="test">
  42. </pre>
  43. </body>
  44. </html>