3 <script src="../../js/resources/js-test-pre.js"></script>
8 <select name="set_sel">
9 <option id='opt'>========</option>
12 <select name="get_sel">
13 <option id="one">option 1</option>
14 <option id="two">option 2</option>
19 description('Tests the indexed setter and getter for HTMLOptionsCollection.');
21 document.my_form.set_sel.options[1] = new Option("A");
22 document.my_form.set_sel.options[2] = new Option("B");
23 shouldBe("my_form.set_sel.options.length", "3");
25 var options = document.my_form.get_sel.options;
26 shouldBe("options[0]", "document.getElementById('one')");
27 shouldBe("options[1]", "document.getElementById('two')");
29 <script src="../../js/resources/js-test-post.js"></script>