OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/js-test.js"></script> |
| 3 <div id="host">Should be green</div> |
| 4 <script> |
| 5 description("Multiple :host(-context) pseudos in same compound."); |
| 6 |
| 7 host.createShadowRoot(); |
| 8 |
| 9 [ |
| 10 ":host:host-context(body)", |
| 11 ":host-context(:not(.nomatch)):host", |
| 12 ":host:host:host", |
| 13 ":host-context(body):host-context(html)", |
| 14 ":host(:not(.nomatch)):host" |
| 15 ].forEach((selector) => { |
| 16 host.shadowRoot.innerHTML = "<style>" + selector + "{color:green}</style
><content/>"; |
| 17 shouldBeEqualToString("getComputedStyle(host).color", "rgb(0, 128, 0)"); |
| 18 |
| 19 host.shadowRoot.innerHTML = "<style>" + selector + "::before" + "{color:
green;content:'green'}</style><content/>"; |
| 20 shouldBeEqualToString("getComputedStyle(host, '::before').color", "rgb(0
, 128, 0)"); |
| 21 }); |
| 22 |
| 23 </script> |
OLD | NEW |