| <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> |