| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <style> | 3 <style> |
| 4 @media all { #test { color: green; } } | 4 @media all { #test { color: green; } } |
| 5 </style> | 5 </style> |
| 6 <script src="../../js/resources/js-test-pre.js"></script> | 6 <script src="../../js/resources/js-test-pre.js"></script> |
| 7 </head> | 7 </head> |
| 8 <body> | 8 <body> |
| 9 <div id="test"></div> | 9 <div id="test"></div> |
| 10 <script> | 10 <script> |
| 11 description("Test that CSS stylesheets lacking wrappers are pruned from detached
CSSOM subtrees. " + | 11 description("Test that CSS stylesheets lacking wrappers are pruned from detached
CSSOM subtrees. " + |
| 12 "This is surprising behavior, but it's a very rare situation, and the behavior a
ctually matches " + | 12 "This is surprising behavior, but it's a very rare situation, and the behavior a
ctually matches " + |
| 13 "what both WebKit and Gecko do for DOM nodes in detached subtrees."); | 13 "what both WebKit and Gecko do for DOM nodes in detached subtrees."); |
| 14 | 14 |
| 15 shouldBe('getMatchedCSSRules(document.getElementById("test")).length', '1'); | 15 shouldBe('getMatchedCSSRules(document.getElementById("test")).length', '1'); |
| 16 rule = getMatchedCSSRules(document.getElementById("test")).item(0); | 16 rule = getMatchedCSSRules(document.getElementById("test")).item(0); |
| 17 debug("Removing <style>..."); | 17 debug("Removing <style>..."); |
| 18 document.head.removeChild(document.getElementsByTagName("style")[0]); | 18 document.head.removeChild(document.getElementsByTagName("style")[0]); |
| 19 shouldBe("rule.parentRule", "null"); | 19 shouldBe("rule.parentRule", "null"); |
| 20 shouldBe('getMatchedCSSRules(document.getElementById("test"))', 'null'); | 20 shouldBe('getMatchedCSSRules(document.getElementById("test"))', 'null'); |
| 21 </script> | 21 </script> |
| 22 <script src="../../js/resources/js-test-post.js"></script> | |
| 23 </body> | 22 </body> |
| 24 </html> | 23 </html> |
| OLD | NEW |