tizen beta release
[profile/ivi/webkit-efl.git] / LayoutTests / fast / dom / HTMLOptionElement / collection-setter-getter.html
1 <html>
2 <head>
3 <script src="../../js/resources/js-test-pre.js"></script>
4 </head>
5 <body>
6
7 <form name="my_form">
8 <select name="set_sel">
9     <option id='opt'>========</option>
10 </select>
11
12 <select name="get_sel">
13     <option id="one">option 1</option>
14     <option id="two">option 2</option>
15 </select>
16 </form>
17
18 <script>
19 description('Tests the indexed setter and getter for HTMLOptionsCollection.');
20
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");
24
25 var options = document.my_form.get_sel.options;
26 shouldBe("options[0]", "document.getElementById('one')");
27 shouldBe("options[1]", "document.getElementById('two')");
28 </script>
29 <script src="../../js/resources/js-test-post.js"></script>
30 </body>
31 </html>