<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script>
function print(message)
{
    var paragraph = document.createElement("li");
    paragraph.appendChild(document.createTextNode(message));
    document.getElementById("console").appendChild(paragraph);
}
function test()
{
    if (window.testRunner)
        testRunner.dumpAsText();
    selectElement = document.getElementById("select1");
    if (selectElement.value == "3")
        print("LOAD:SUCCEEDED!");
    else
        print("LOAD:FAILED: Expected '3' found " + selectElement.value);
    selectElement.getElementsByTagName("option").item(1).selected=true;
    if (selectElement.value == "2")
        print("SELECT:SUCCEEDED!");
    else
        print("SELECT:FAILED: Expected '2' found " + selectElement.value);
    document.getElementById("reset1").click();
    if (selectElement.value == "3")
        print("RESET:SUCCEEDED!");
    else
        print("RESET:FAILED: Expected '3' found " + selectElement.value);
}
</script>
</head>
<body onload="test()">
<p>This test checks to see what happens if we mark 2 items as selected in a single selection select element.</p>
<p>If The test succeeds one should see 3 lines below the ruller below each containing the word SUCCEEDED in it.</p>
<form id="form1" method="post" action="form_resp.asp">
  <select name="Select" size="2" id="select1">
    <option selected="selected">1</option>
    <option>2</option>
    <option selected="selected">3</option>

    <option>4</option>
  </select>
<input type="reset" name="reset" value="Reset 1" id="reset1"/><br/>
<hr>
<p><ol id=console></ol></p>
</form></body></html>
