Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / forms / option-in-optgroup-removal.html
blob140d85e73e485218ff10e0e73d117e1491ffc190
1 <html>
2 <script>
3 function test() {
4 if (window.testRunner)
5 testRunner.dumpAsText();
6 var list = document.getElementById("S1");
7 list.remove(3);
8 log(list.length == 3 ? "Passed" : "Failed");
10 function log(msg) {
11 var console = document.getElementById('console');
12 console.innerHTML = console.innerHTML + msg + "<br>";
14 </script>
15 </head>
16 <body onload="test()">
17 <br>This tests that an option in a optgroup can be removed from the containing select.</br>
18 <select name="S1" id="S1">
19 <optgroup label="Group 1">
20 <option value="1">Option 1</option>
21 <option value="2">Option 2</option>
22 <option value="3">Option 3</option>
23 <option value="4">Option 4</option>
24 </optgroup>
25 </select>
26 <div id="console"></div>
27 </body>
28 </html>