blob: e79e877f812a115fa23650a628e97a440c330f6b [file] [log] [blame]
<html>
<head>
<script>
function test() {
if (window.testRunner)
testRunner.dumpAsText();
var sl = document.getElementById('sl');
sl.selectedIndex = 1;
sl.selectedIndex = 2;
sl.selectedIndex = 0;
sl.selectedIndex = -1;
sl.selectedIndex = 0;
sl.selectedIndex = 5;
}
</script>
</head>
<body onload="test()">
This tests that we don't crash when setting the selectedIndex out of bounds<br>
<select id="sl">
<optgroup label="group">
<option id="op1">1
<option id="op2">2
</optgroup>
</select>
</body>
</html>