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

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

Issue 316003002: DevTools: add test to verify matched styles for ::content selector (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaseline 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
« no previous file with comments | « no previous file | LayoutTests/inspector-protocol/css/css-shadow-host-content-selector-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html>
1 <html> 2 <html>
2 <head> 3 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script> 4 <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" src="css-protocol-test.js"></script>
5 <script type="text/javascript"> 6 <script type="text/javascript">
6 function test() 7 function test()
7 { 8 {
8 InspectorTest.sendCommandOrDie("CSS.enable", {}, onCSSEnabled); 9 InspectorTest.sendCommandOrDie("CSS.enable", {}, onCSSEnabled);
9 10
10 function onCSSEnabled() 11 function onCSSEnabled()
11 { 12 {
12 InspectorTest.requestNodeId("#shadow-host", onNodeReceived); 13 InspectorTest.requestNodeId("#shadow-content", onNodeReceived);
13 } 14 }
14 15
15 function onNodeReceived(nodeId) 16 function onNodeReceived(nodeId)
16 { 17 {
17 InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, InspectorTest.comp leteTest.bind(InspectorTest)); 18 InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, InspectorTest.comp leteTest.bind(InspectorTest));
18 } 19 }
19 } 20 }
20 </script> 21 </script>
21 <template id="shadow-template">
22 <style>
23 :host {
24 color: red;
25 }
26 </style>
27 <div>Hi!</div>
28 </template>
29 </head> 22 </head>
30 <body> 23 <body>
31 <div id="shadow-host"></div> 24 <div id="shadow-host">
32 <script> 25 <p id="shadow-content">This text is bold</p>
33 var host = document.querySelector("#shadow-host").createShadowRoot(); 26 </div>
34 var template = document.querySelector("#shadow-template"); 27 <script type="text/javascript">
35 host.appendChild(template.content); 28 var host = document.querySelector("#shadow-host");
36 template.remove(); 29 var root = host.createShadowRoot();
30 root.innerHTML = "<style>:host ::content * { font-weight: bold; }</style ><content></content>";
37 runTest(); 31 runTest();
38 </script> 32 </script>
39 </body> 33 </body>
40 </html> 34 </html>
35
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector-protocol/css/css-shadow-host-content-selector-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698