1 <p>This test that setting HTMLSelectElement.length is capped to
10,
000, but that you can add additional Option elements by calling add.
</p>
2 <div id=
"console"></div>
3 <select id=
"theSelect"></select>
4 <script src=
"../../resources/js-test.js"></script>
6 var sel
= document
.getElementById('theSelect');
7 shouldBe('sel.length', '0');
9 debug('Trying: - sel.length = 20000;');
11 shouldBe('sel.length', '0');
13 debug('Trying: - sel.add(new Option, 0);');
14 sel
.add(new Option
, 0);
15 shouldBe('sel.length', '1');
17 debug('Trying: - sel.length = 0;');
19 shouldBe('sel.length', '0');
21 debug('Index setter:');
22 shouldBe('sel[20000] = new Option(); sel.length', '0');
23 shouldBe('sel.options[20000] = new Option(); sel.length', '0');