<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>

<form name="my_form">
<select name="set_sel">
    <option id='opt'>========</option>
</select>

<select name="get_sel">
    <option id="one">option 1</option>
    <option id="two">option 2</option>
</select>
</form>

<script>
description('Tests the indexed setter and getter for HTMLOptionsCollection.');

document.my_form.set_sel.options[1] = new Option("A");
document.my_form.set_sel.options[2] = new Option("B");
shouldBe("my_form.set_sel.options.length", "3");

var options = document.my_form.get_sel.options;
shouldBe("options[0]", "document.getElementById('one')");
shouldBe("options[1]", "document.getElementById('two')");
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>
