Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector-protocol / css / css-shadow-host-content-selector.html
blob3c8806ddaee82d975bc755ee203e077e1c0f2c66
1 <!DOCTYPE html>
2 <html>
3 <head>
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">
8 function test()
10 var documentNodeId;
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));
29 </script>
30 </head>
31 <body>
32 <div id="shadow-host">
33 <p id="shadow-content">This text is bold</p>
34 </div>
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>";
39 runTest();
40 </script>
41 </body>
42 </html>