blob: 1ec1ab98d060eacd09987960d1c98959f439a541 [file] [log] [blame]
<!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>