OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script> | 3 <script> |
4 function test() { | 4 function test() { |
5 if (window.testRunner) | 5 if (window.testRunner) |
6 testRunner.dumpAsText(); | 6 testRunner.dumpAsText(); |
7 var sl = document.getElementById('sl'); | 7 var sl = document.getElementById('sl'); |
8 sl.selectedIndex = 1; | 8 sl.selectedIndex = 1; |
9 sl.selectedIndex = 2; | 9 sl.selectedIndex = 2; |
10 sl.selectedIndex = 0; | 10 sl.selectedIndex = 0; |
11 sl.selectedIndex = -1; | 11 sl.selectedIndex = -1; |
12 sl.selectedIndex = 0; | 12 sl.selectedIndex = 0; |
13 sl.selectedIndex = 5; | 13 sl.selectedIndex = 5; |
14 } | 14 } |
15 </script> | 15 </script> |
16 </head> | 16 </head> |
17 <body onload="test()"> | 17 <body onload="test()"> |
18 This tests that we don't crash when setting the selectedIndex out of bou
nds<br> | 18 This tests that we don't crash when setting the selectedIndex out of bou
nds<br> |
19 <select id="sl"> | 19 <select id="sl"> |
20 <optgroup label="group"> | 20 <optgroup label="group"> |
21 <option id="op1">1 | 21 <option id="op1">1 |
22 <option id="op2">2 | 22 <option id="op2">2 |
23 </optgroup> | 23 </optgroup> |
24 </select> | 24 </select> |
25 </body> | 25 </body> |
26 </html> | 26 </html> |
OLD | NEW |