blob: 719b7fe576680898a8d5c7e30aeb75bf9d91d3f9 [file] [log] [blame]
<html>
<head>
<title></title>
</head>
<body>
<p>
This is a test for <i><a href="http://bugs.webkit.org/show_bug.cgi?id=10472">http://bugs.webkit.org/show_bug.cgi?id=10472</a>
REGRESSION: "add" method of &lt;select> object does not put the &lt;option> object in the correct position</i>.
</p>
<p>
Result: <span id="result">FAIL (test did not run)</span>
</p>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
var select = document.createElement("select");
var lastOption = document.createElement("option");
lastOption.text = "last";
select.add(lastOption);
// Access the collection
select.options[0];
var firstOption = document.createElement("option");
firstOption.text = "first";
select.add(firstOption, lastOption);
document.getElementById("result").innerText = select.options[0] == firstOption ? "PASS" : "FAIL";
</script>
</body>
</html>