| OLD | NEW |
| (Empty) |
| 1 <!doctype html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../../../resources/js-test.js"></script> | |
| 5 <style> | |
| 6 .contentClass { | |
| 7 color: blue; | |
| 8 } | |
| 9 </style> | |
| 10 </head> | |
| 11 <body class="bodyClass"> | |
| 12 | |
| 13 <template id="tmpl"> | |
| 14 <style> | |
| 15 ::content > * { | |
| 16 color: red; | |
| 17 } | |
| 18 </style> | |
| 19 <content></content> | |
| 20 </template> | |
| 21 | |
| 22 <div id="host" class="hostClass"> | |
| 23 <div class="contentClass"> | |
| 24 content | |
| 25 </div> | |
| 26 </div> | |
| 27 | |
| 28 <pre id='console'></pre> | |
| 29 </body> | |
| 30 <script> | |
| 31 description('Test for crbug.com/274059. Should be able to override ::content sty
les in shadow root style sheet from the document.'); | |
| 32 var host = document.querySelector('#host'); | |
| 33 var root = host.createShadowRoot(); | |
| 34 var template = document.querySelector('#tmpl'); | |
| 35 root.appendChild(template.content); | |
| 36 shouldBe('window.getComputedStyle(document.querySelector(".contentClass")).color
', '"rgb(0, 0, 255)"'); | |
| 37 </script> | |
| 38 </html> | |
| OLD | NEW |