| <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 <select> object does not put the <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> |