OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <style>.t { color: green }</style> | 2 <style>.t { color: green }</style> |
3 <div id="host"> | 3 <div id="host"> |
4 <span id="t" class="t">This text should be green.</span> | 4 <span id="t" class="t">This text should be green.</span> |
5 </div> | 5 </div> |
6 <script> | 6 <script> |
7 if (window.testRunner) | 7 if (window.testRunner) |
8 testRunner.dumpAsText(); | 8 testRunner.dumpAsText(); |
9 | 9 |
10 var root = host.attachShadow({'mode': 'open'}); | 10 var root = host.attachShadow({'mode': 'open'}); |
11 root.innerHTML = '<style>::slotted(*) { color: red }</style><slot></slot>'; | 11 root.innerHTML = '<style>::slotted(*) { color: red }</style><slot></slot>'; |
12 document.write(getComputedStyle(t).color == 'rgb(0, 128, 0)' ? 'PASS' : 'FAIL'); | 12 document.write(getComputedStyle(t).color == 'rgb(0, 128, 0)' ? 'PASS' : 'FAIL'); |
13 </script> | 13 </script> |
OLD | NEW |