| if (window.layoutTestController) |
| layoutTestController.dumpAsText(); |
| var select = document.getElementById('select'); |
| var index = select.selectedIndex; |
| document.forms[0].reset(); |
| var message = "selected index is " + index + " before and " + select.selectedIndex + " after reset()."; |
| var paragraph = document.createElement('p'); |
| paragraph.appendChild(document.createTextNode(message)); |
| document.getElementById('console').appendChild(paragraph); |
| <p>This tests reseting of a select box with no selected options using JavaScript. If successful, both times the selected index should be 0.<form> |
| <option>Option 0</option> |
| <option>Option 1</option> |
| <option>Option 2</option> |