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