blob: 66eee2097905a09b3791a5a4b46ff4f16ef1e2b7 [file] [log] [blame]
<html>
<head>
<style>
#test-element {
text-decoration: line-through;
}
</style>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<span id="test-element"></div>
<script>
description("Test that CSS stylesheets lacking wrappers are pruned from detached CSSOM subtrees. " +
"This is surprising behavior, but it's a very rare situation, and the behavior actually matches " +
"what both WebKit and Gecko do for DOM nodes in detached subtrees.");
var rule = getMatchedCSSRules(document.getElementById("test-element")).item(0);
document.documentElement.removeChild(document.head);
shouldBe("rule.parentStyleSheet", "null");
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>