blob: 5432a52d15271ccba97ffb4268b7a994601840e7 [file] [log] [blame]
<html>
<head>
<script>
function loaded()
{
if (!window.layoutTestController) {
alert("This test must be run in the DumpRenderTree to work.");
return;
}
layoutTestController.setAuthorAndUserStylesEnabled(false);
// Check the matched rules after a timeout to give time for WebPreferences to update WebCore::Settings.
setTimeout(checkMatchedRules, 0);
}
function checkMatchedRules()
{
var matchedRules = getMatchedCSSRules(document.getElementById("test"), "", true);
if (matchedRules && matchedRules.length)
alert(matchedRules.length + " rule(s) were returned from getMatchedCSSRules, expected zero.");
}
</script>
<style>
#test {
color: red;
}
#test2::before {
color: red;
content: "This pseudo-element text should not show up.";
}
</style>
</head>
<body onload="loaded();">
<div id="test">This text should be black, not red.</div>
<div id="test2"></div>
</body>
</html>