Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / select-out-of-bounds-index.html
blobe79e877f812a115fa23650a628e97a440c330f6b
1 <html>
2 <head>
3 <script>
4 function test() {
5 if (window.testRunner)
6 testRunner.dumpAsText();
7 var sl = document.getElementById('sl');
8 sl.selectedIndex = 1;
9 sl.selectedIndex = 2;
10 sl.selectedIndex = 0;
11 sl.selectedIndex = -1;
12 sl.selectedIndex = 0;
13 sl.selectedIndex = 5;
15 </script>
16 </head>
17 <body onload="test()">
18 This tests that we don't crash when setting the selectedIndex out of bounds<br>
19 <select id="sl">
20 <optgroup label="group">
21 <option id="op1">1
22 <option id="op2">2
23 </optgroup>
24 </select>
25 </body>
26 </html>