OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/js-test.js"></script> |
| 3 <script src="resources/shadow-dom.js"></script> |
| 4 <div id="sandbox"></div> |
| 5 <script> |
| 6 description("::content /deep/ should match deep into distributed subtree."); |
| 7 |
| 8 var shadowStyle = document.createElement('style'); |
| 9 shadowStyle.innerText = "::content /deep/ #target { color: green; }"; |
| 10 |
| 11 sandbox.appendChild( |
| 12 createDOM('div', {}, |
| 13 createShadowRoot( |
| 14 shadowStyle, |
| 15 createDOM('content')), |
| 16 createDOM('div', {'id': 'inner'}, |
| 17 createShadowRoot( |
| 18 createDOM('div', {'id': 'target'}, |
| 19 document.createTextNode('This text should be green')))))); |
| 20 |
| 21 var target = sandbox.querySelector("#inner").shadowRoot.querySelector("#target")
; |
| 22 |
| 23 shouldBeEqualToString("getComputedStyle(target).color", "rgb(0, 128, 0)"); |
| 24 </script> |
OLD | NEW |