OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../js/resources/js-test-pre.js"></script> | 3 <script src="../../../resources/js-test.js"></script> |
4 </head> | 4 </head> |
5 <body> | 5 <body> |
6 | 6 |
7 <form name="my_form"> | 7 <form name="my_form"> |
8 <select name="set_sel"> | 8 <select name="set_sel"> |
9 <option id='opt'>========</option> | 9 <option id='opt'>========</option> |
10 </select> | 10 </select> |
11 | 11 |
12 <select name="get_sel"> | 12 <select name="get_sel"> |
13 <option id="one">option 1</option> | 13 <option id="one">option 1</option> |
14 <option id="two">option 2</option> | 14 <option id="two">option 2</option> |
15 </select> | 15 </select> |
16 </form> | 16 </form> |
17 | 17 |
18 <script> | 18 <script> |
19 description('Tests the indexed setter and getter for HTMLOptionsCollection.'); | 19 description('Tests the indexed setter and getter for HTMLOptionsCollection.'); |
20 | 20 |
21 document.my_form.set_sel.options[1] = new Option("A"); | 21 document.my_form.set_sel.options[1] = new Option("A"); |
22 document.my_form.set_sel.options[2] = new Option("B"); | 22 document.my_form.set_sel.options[2] = new Option("B"); |
23 shouldBe("my_form.set_sel.options.length", "3"); | 23 shouldBe("my_form.set_sel.options.length", "3"); |
24 | 24 |
25 var options = document.my_form.get_sel.options; | 25 var options = document.my_form.get_sel.options; |
26 shouldBe("options[0]", "document.getElementById('one')"); | 26 shouldBe("options[0]", "document.getElementById('one')"); |
27 shouldBe("options[1]", "document.getElementById('two')"); | 27 shouldBe("options[1]", "document.getElementById('two')"); |
28 </script> | 28 </script> |
29 </body> | 29 </body> |
30 </html> | 30 </html> |
OLD | NEW |