chromium/third_party/blink/web_tests/fast/forms/select/length-not-overridden.html

<html>
    <head>
        <script>
            function log(msg)
            {
                document.getElementById('console').appendChild(document.createTextNode(msg + '\n'));
            }

            function test()
            {
                if (window.testRunner)
                    testRunner.dumpAsText();

                var sl = document.getElementById("sl");

                // This checks that the select element's length property is still '1',
                // even though there is an option with the same name
                if (sl.length == 1)
                    log("Select Element Test Passed");
                else
                    log("Select Element Test Failed");

                // This checks that the option collection's length property is still '1',
                // even though there is an option with the same name
                if (sl.options.length == 1)
                    log("Options Collection Test Passed");
                else
                    log("Options Collection Test Failed");
            }
        </script>
    </head>
    <body onload="test()">
        This tests that the length property is not overriden by having an option with the name 'length'.<br>
        <select id="sl"><option value="Length" name="length" /></select>
        <pre id="console"></pre>
    </body>
</html>