OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> | |
4 <script type="text/javascript" src="css-protocol-test.js"></script> | |
5 <script type="text/javascript"> | |
6 function test() | |
7 { | |
8 InspectorTest.sendCommandOrDie("CSS.enable", {}, onCSSEnabled); | |
9 | |
10 function onCSSEnabled() | |
11 { | |
12 InspectorTest.requestNodeId("#shadow-host", onNodeReceived); | |
13 } | |
14 | |
15 function onNodeReceived(nodeId) | |
16 { | |
17 InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, InspectorTest.comp
leteTest.bind(InspectorTest)); | |
18 } | |
19 } | |
20 </script> | |
21 <template id="shadow-template"> | |
22 <style> | |
23 :host { | |
24 color: red; | |
25 } | |
26 </style> | |
27 <div>Hi!</div> | |
28 </template> | |
29 </head> | |
30 <body> | |
31 <div id="shadow-host"></div> | |
32 <script> | |
33 var host = document.querySelector("#shadow-host").createShadowRoot(); | |
34 var template = document.querySelector("#shadow-template"); | |
35 host.appendChild(template.content); | |
36 template.remove(); | |
37 runTest(); | |
38 </script> | |
39 </body> | |
40 </html> | |
OLD | NEW |