blob: 7ca87cf3f46a53dfaab98e4dd2fab202324adefe [file] [log] [blame]
<html>
<head>
<script>
if (window.testRunner)
{
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function runTest()
{
style = document.createElement('style');
style.textContent = '@media all { body { color: red } }';
document.head.appendChild(style);
ruleList = getMatchedCSSRules(document.body);
document.styleSheets[0].cssRules[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>