OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 <script src="resources/shadow-dom.js"></script> | 5 <script src="resources/shadow-dom.js"></script> |
6 <style> | 6 <style> |
7 :host-context(*) { | 7 :host-context(*) { |
8 background-color: red; | 8 background-color: red; |
9 } | 9 } |
10 </style> | 10 </style> |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 sandbox.appendChild( | 194 sandbox.appendChild( |
195 createDOM('div', {'id': 'parentOfHost'}, | 195 createDOM('div', {'id': 'parentOfHost'}, |
196 createShadowRoot( | 196 createShadowRoot( |
197 createDOM('span', {'id': 'spanA'}, | 197 createDOM('span', {'id': 'spanA'}, |
198 document.createTextNode('no content, no shadow'))), | 198 document.createTextNode('no content, no shadow'))), |
199 createShadowRoot( | 199 createShadowRoot( |
200 createDOM('span', {'id': 'spanB'}, | 200 createDOM('span', {'id': 'spanB'}, |
201 createDOM('content', {}))), | 201 createDOM('content', {}))), |
202 createShadowRoot( | 202 createShadowRoot( |
203 createDOM('span', {'id': 'spanC'}, | 203 createDOM('span', {'id': 'spanC'}, |
204 createDOM('shadow', {}, | 204 createDOM('shadow', {}))), |
205 createDOM('content')))), | |
206 createDOM('div', {'id': 'host'}, | 205 createDOM('div', {'id': 'host'}, |
207 createShadowRoot( | 206 createShadowRoot( |
208 createDOM('style', {}, | 207 createDOM('style', {}, |
209 document.createTextNode(':host-context(span#spanA) > #target
A { background-color: red; }')), | 208 document.createTextNode(':host-context(span#spanA) > #target
A { background-color: red; }')), |
210 createDOM('style', {}, | 209 createDOM('style', {}, |
211 document.createTextNode(':host-context(span#spanB) > #target
B { background-color: green; }')), | 210 document.createTextNode(':host-context(span#spanB) > #target
B { background-color: green; }')), |
212 createDOM('style', {}, | 211 createDOM('style', {}, |
213 document.createTextNode(':host-context(span#spanC) > #target
C { background-color: green; }')), | 212 document.createTextNode(':host-context(span#spanC) > #target
C { background-color: green; }')), |
214 createDOM('div', {'id': 'targetA'}, | 213 createDOM('div', {'id': 'targetA'}, |
215 document.createTextNode('Hello')), | 214 document.createTextNode('Hello')), |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 document.createTextNode(':host-context { background-color: red;
}')), | 340 document.createTextNode(':host-context { background-color: red;
}')), |
342 createDOM('div', {}, | 341 createDOM('div', {}, |
343 document.createTextNode('Hello'))))); | 342 document.createTextNode('Hello'))))); |
344 | 343 |
345 backgroundColorShouldBe('host', 'rgba(0, 0, 0, 0)'); | 344 backgroundColorShouldBe('host', 'rgba(0, 0, 0, 0)'); |
346 | 345 |
347 cleanUp(); | 346 cleanUp(); |
348 | 347 |
349 </script> | 348 </script> |
350 </body> | 349 </body> |
OLD | NEW |