| <!DOCTYPE html> |
| <html> |
| <head> |
| <title>::content pseudo elements with dynamic attribute change</title> |
| </head> |
| <body> |
| <div id="host"> |
| <div id="child">I should be green.</div> |
| </div> |
| <script> |
| if (window.testRunner) |
| testRunner.waitUntilDone(); |
| var shadowRoot = document.getElementById('host').createShadowRoot(); |
| shadowRoot.innerHTML = '<style>content::content .selected { ' + |
| 'background: green; }</style>' + |
| '<content></content>'; |
| |
| setTimeout(function() { |
| document.getElementById('child').classList.add('selected'); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| }, 0); |
| </script> |
| </body> |
| </html> |