4 <script type=
"text/javascript" src=
"../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
5 <script type=
"text/javascript" src=
"../../http/tests/inspector-protocol/css-protocol-test.js"></script>
6 <script type=
"text/javascript" src=
"../../http/tests/inspector-protocol/dom-protocol-test.js"></script>
7 <script type=
"text/javascript">
11 InspectorTest
.requestDocumentNodeId(onDocumentNodeId
);
13 function onDocumentNodeId(nodeId
)
15 documentNodeId
= nodeId
;
16 InspectorTest
.sendCommandOrDie("CSS.enable", {}, onCSSEnabled
);
19 function onCSSEnabled()
21 InspectorTest
.requestNodeId(documentNodeId
, "#shadow-content", onNodeReceived
);
24 function onNodeReceived(nodeId
)
26 InspectorTest
.loadAndDumpMatchingRulesForNode(nodeId
, InspectorTest
.completeTest
.bind(InspectorTest
));
32 <div id=
"shadow-host">
33 <p id=
"shadow-content">This text is bold
</p>
35 <script type=
"text/javascript">
36 var host
= document
.querySelector("#shadow-host");
37 var root
= host
.createShadowRoot();
38 root
.innerHTML
= "<style>:host ::content * { font-weight: bold; }</style><content></content>";