summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/select/select-index-setter.html
blob: c894708587e456f8eabc693e6671d87079978ea3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<html>
    <head>
        <script>
            function test()
            {
                if (window.testRunner)
                    testRunner.dumpAsText();
                
                var sl = document.getElementById('sl');
                var no = new Option();
                no.text = "Test Passed";
                if (sl[0].text == "Test Failed")
                    sl[0] = no;
                document.getElementById('res').innerHTML = sl[0].text;
            }
        </script>
    </head>
    <body onload="test()">
        This tests that you can index into a select element to get and set an option element.<br>
        <select id="sl" multiple>
            <option>Test Failed</option>
        </select>
        <div id="res"></div>
    </body>
</html>