| <!DOCTYPE html> | |
| <div id="host"> | |
| <div id="child">I should be green.</div> | |
| </div> | |
| <script> | |
| if (window.testRunner) | |
| testRunner.waitUntilDone(); | |
| var shadowRoot = document.getElementById('host').attachShadow({mode: 'open'}); | |
| shadowRoot.innerHTML = '<style>slot::slotted(.selected) { ' + | |
| 'background: green; }</style>' + | |
| '<slot></slot>'; | |
| setTimeout(function() { | |
| document.getElementById('child').classList.add('selected'); | |
| if (window.testRunner) | |
| testRunner.notifyDone(); | |
| }, 0); | |
| </script> |