<html> | |
<head> | |
<script src="../../../resources/js-test-pre.js"></script> | |
</head> | |
<body onload="test()"> | |
<script> | |
window.jsTestIsAsync = true; | |
description("Test that CSS stylesheets don't lose custom properties on GC when only reachable through child rules."); | |
function test() | |
{ | |
var sheet = document.implementation.createCSSStyleSheet("title", "screen"); | |
sheet.foo = "0"; | |
sheet.insertRule("div { color:black }", 0); | |
rule = sheet.rules[0]; | |
sheet = null; | |
gc(); | |
setTimeout(function() { | |
gc(); | |
shouldBe('rule.parentStyleSheet.foo', '"0"'); | |
finishJSTest(); | |
}, 0); | |
} | |
</script> | |
<foo id="mystyle" style="display:none">.div { color: white; }</foo> | |
<script src="../../../resources/js-test-post.js"></script> | |
</body> | |
</html> |