OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/js-test.js"></script> |
| 3 <div id="host"></div> |
| 4 <script> |
| 5 var root = host.createShadowRoot(); |
| 6 root.innerHTML = '<style title="not-preferred">div { color: red }</style><st
yle title="ignored">div { color: green }</style><div>Should be green</div>'; |
| 7 </script> |
| 8 <style>#alternate { color: green }</style> |
| 9 <link rel="alternate stylesheet" title="not-preferred" href="data:text/css,#alte
rnate { color: red }"> |
| 10 </style> |
| 11 <div id="alternate">Should be green</div> |
| 12 <script> |
| 13 description("Title attribute should be ignored for style elements in shadow
trees."); |
| 14 |
| 15 shouldBeEqualToString("getComputedStyle(root.querySelector('div')).color", "
rgb(0, 128, 0)"); |
| 16 shouldBeEqualToString("getComputedStyle(alternate).color", "rgb(0, 128, 0)")
; |
| 17 </script> |
OLD | NEW |