blob: 140d85e73e485218ff10e0e73d117e1491ffc190 [file] [log] [blame]
<html>
<script>
function test() {
if (window.testRunner)
testRunner.dumpAsText();
var list = document.getElementById("S1");
list.remove(3);
log(list.length == 3 ? "Passed" : "Failed");
}
function log(msg) {
var console = document.getElementById('console');
console.innerHTML = console.innerHTML + msg + "<br>";
}
</script>
</head>
<body onload="test()">
<br>This tests that an option in a optgroup can be removed from the containing select.</br>
<select name="S1" id="S1">
<optgroup label="Group 1">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
<option value="4">Option 4</option>
</optgroup>
</select>
<div id="console"></div>
</body>
</html>