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 <link rel="stylesheet" href="../../js/resources/js-test-style.css" type="text/cs
s" title="js-test-style"> | 6 <link rel="stylesheet" href="../../js/resources/js-test-style.css" type="text/cs
s" title="js-test-style"> |
7 <script src="../../js/resources/js-test-pre.js"></script> | 7 <script src="../../js/resources/js-test-pre.js"></script> |
8 </head> | 8 </head> |
9 <body> | 9 <body> |
10 <p id="description"></p> | 10 <p id="description"></p> |
11 <div id="console"></div> | 11 <div id="console"></div> |
12 <div id="test"></div> | 12 <div id="test"></div> |
13 <script> | 13 <script> |
14 description("Test that CSS stylesheets lacking wrappers are pruned from detached
CSSOM subtrees. " + | 14 description("Test that CSS stylesheets lacking wrappers are pruned from detached
CSSOM subtrees. " + |
15 "This is surprising behavior, but it's a very rare situation, and the behavior a
ctually matches " + | 15 "This is surprising behavior, but it's a very rare situation, and the behavior a
ctually matches " + |
16 "what both WebKit and Gecko do for DOM nodes in detached subtrees."); | 16 "what both WebKit and Gecko do for DOM nodes in detached subtrees."); |
17 | 17 |
18 shouldBe('getMatchedCSSRules(document.getElementById("test")).length', '1'); | 18 shouldBe('getMatchedCSSRules(document.getElementById("test")).length', '1'); |
19 rule = getMatchedCSSRules(document.getElementById("test")).item(0); | 19 rule = getMatchedCSSRules(document.getElementById("test")).item(0); |
20 debug("Removing <style>..."); | 20 debug("Removing <style>..."); |
21 document.head.removeChild(document.getElementsByTagName("style")[0]); | 21 document.head.removeChild(document.getElementsByTagName("style")[0]); |
22 shouldBe("rule.parentRule", "null"); | 22 shouldBe("rule.parentRule", "null"); |
23 shouldBe('getMatchedCSSRules(document.getElementById("test"))', 'null'); | 23 shouldBe('getMatchedCSSRules(document.getElementById("test"))', 'null'); |
24 | 24 |
25 var successfullyParsed = true; | 25 var successfullyParsed = true; |
26 </script> | 26 </script> |
27 <script src="../../js/resources/js-test-post.js"></script> | 27 <script src="../../js/resources/js-test-post.js"></script> |
28 </body> | 28 </body> |
29 </html> | 29 </html> |
OLD | NEW |