Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: LayoutTests/inspector-protocol/css/css-shadow-host-rule.html

Issue 317703002: DevTools: add test to verify matched styles for :host selector (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698