blob: 808c65e42f9ea085a56a79ee6d8905b2931e368b [file] [log] [blame]
<html>
<head>
<script>
if (window.testRunner)
{
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function runTest()
{
style = document.createElement('style');
style.textContent = 'body { color: red }';
document.head.appendChild(style);
ruleList = getMatchedCSSRules(document.body);
document.styleSheets[0].deleteRule(0);
document.head.removeChild(style);
gc();
if (!ruleList[0].parentStyleSheet)
document.getElementById('result').innerHTML = "PASS";
if (window.testRunner)
testRunner.notifyDone();
}
function gc()
{
if (window.GCController)
return GCController.collect();
for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
var s = new String("abc");
}
}
</script>
</head>
<body onload="runTest()">
<div id="result"></div>
</body>
</html>