<!DOCTYPE html>
<html>
    <head>
        <title>CSS Selector :enabled test for Anchor, Area & Link Elements</title>
        <script>
            if (window.testRunner)
                testRunner.dumpAsText();

            function runTest() {
                var div = document.getElementById("result");
                var enabledElems = document.querySelectorAll(":enabled");
                if (enabledElems.length == 0)
                    div.innerHTML = "SUCCESS";
                else
                    div.innerHTML = "FAIL";
            }

            window.onload = runTest;
        </script>
        <link id="link-1" rel="external" href="http://www.example.com"></link>
        <link id="link-2" rel="external"></link>
    </head>
    <body>
        <div>This test checks if :enabled CSS selector should not match Anchor, Area or Link elements with 'href' attribute set.</div>
        <a id="anchor-1" href="http://www.example.com"></a>
        <a id="anchor-2"></a>
        <img id="image" width="300" height="200" usemap="#map" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAAXNSR0IArs4c6QAAAAxJREFUCNdjYKhnAAABAgCAbV7tZwAAAABJRU5ErkJggg=="/>
        <map name="map">
            <area id="area-1" coords="0,0,300,100" href="http://www.example.com"></area>
            <area id="area-2" coords="0,100,300,200"></area>
        </map>

        <div id="result"></div>
    </body>
</html>
