test_bug405242.html (957B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=405242 5 --> 6 <head> 7 <title>Test for Bug 405252</title> 8 <script 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=405242">Mozilla Bug 405242</a> 13 <p id="display"></p> 14 <div id="content" style="display: none"> 15 16 </div> 17 <pre id="test"> 18 <script class="testbody" type="text/javascript"> 19 /** Test for Bug 405242 */ 20 var sel = document.createElement("select"); 21 sel.appendChild(new Option()); 22 sel.appendChild(new Option()); 23 sel.appendChild(new Option()); 24 opt = new Option(); 25 opt.value = 10; 26 sel.appendChild(opt); 27 sel.options.remove(0); 28 sel.options.remove(1000); 29 sel.options.remove(-1); 30 is(sel.length, 3, "Unexpected option collection length"); 31 is(sel[2].value, "10", "Unexpected remained option"); 32 </script> 33 </pre> 34 </body> 35 </html>