summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css/link-disabled-attr-parser.html
blob: 1ec1ab98d060eacd09987960d1c98959f439a541 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!DOCTYPE html>
<html>
<head>
    <script src="../../resources/js-test.js"></script>
    <!-- This sheet should apply -->
    <link rel="stylesheet" href="resources/red.css">
    <!-- But not this one -->
    <link rel="stylesheet" href="resources/green.css" disabled>
</head>
<body>
    <div id="test"></div>
    <script>
        description("Adding the 'disabled' attribute to a link element causes it to disable its stylesheet");
        var testDiv = document.querySelector('div#test');
        shouldBeEqualToString("getComputedStyle(testDiv).backgroundColor", "rgb(255, 0, 0)");
        var disabledLink = document.querySelector('link[disabled]');
        shouldBeTrue("disabledLink.disabled");
    </script>
</body>
</html>