<p>
    Test for <i><a href="rdar://problem/5879597">rdar://problem/5879597</a>
    Type-to-select in lists with no initial selection can crash</i>.
</p>
<select size="3" id="list">
<option>One</option>
<option>Two</option>
<option>Three</option>
<option>Four</option>
<option>Five</option>
</select>
<div id="result">To run interactively, tab to list and type "12" quickly. If it doesn't crash, the test passed.</div>
<script>
    if (window.testRunner) {
        testRunner.dumpAsText();
        var menu = document.getElementById("list");
        menu.focus();
        eventSender.keyDown("1");
        eventSender.keyDown("2");
        var result = document.getElementById("result");
        result.innerText = "SUCCESS";
    }
</script>
