| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> |
| 4 <script src="resources/shadow-dom.js"></script> |
| 5 <style> |
| 6 body >>> #x { color: red; } |
| 7 </style> |
| 8 <div id="host"> |
| 9 <template data-mode="open"> |
| 10 <div><span id="x">In the shadow tree.</span></div> |
| 11 </template> |
| 12 </div> |
| 13 <script> |
| 14 convertTemplatesToShadowRootsWithin(host); |
| 15 test(() => { |
| 16 var span = document.querySelector('body >>> #x'); |
| 17 assert_equals(span.textContent, 'In the shadow tree.', |
| 18 '>>> should work in static profile.'); |
| 19 |
| 20 var stylesheet = document.styleSheets[0]; |
| 21 assert_equals(stylesheet.cssRules.length, 0, |
| 22 'A selector containing >>> should be discarded in dynamic profile.'); |
| 23 assert_equals(window.getComputedStyle(span).color, 'rgb(0, 0, 0)', |
| 24 '>>> in dynamic profile should not match.'); |
| 25 }, 'deep descendant combinator >>> should work only in static profile.'); |
| 26 </script> |
| OLD | NEW |