Index: LayoutTests/inspector-protocol/css/css-shadow-host-rule.html |
diff --git a/LayoutTests/inspector-protocol/css/css-shadow-host-rule.html b/LayoutTests/inspector-protocol/css/css-shadow-host-rule.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..dc551accccffecfab1883ac5b3ab61a805e106c3 |
--- /dev/null |
+++ b/LayoutTests/inspector-protocol/css/css-shadow-host-rule.html |
@@ -0,0 +1,40 @@ |
+<html> |
+<head> |
+<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> |
+<script type="text/javascript" src="css-protocol-test.js"></script> |
+<script type="text/javascript"> |
+function test() |
+{ |
+ InspectorTest.sendCommandOrDie("CSS.enable", {}, onCSSEnabled); |
+ |
+ function onCSSEnabled() |
+ { |
+ InspectorTest.requestNodeId("#shadow-host", onNodeReceived); |
+ } |
+ |
+ function onNodeReceived(nodeId) |
+ { |
+ InspectorTest.loadAndDumpMatchingRulesForNode(nodeId, InspectorTest.completeTest.bind(InspectorTest)); |
+ } |
+} |
+</script> |
+<template id="shadow-template"> |
+<style> |
+:host { |
+ color: red; |
+} |
+</style> |
+<div>Hi!</div> |
+</template> |
+</head> |
+<body> |
+ <div id="shadow-host"></div> |
+ <script> |
+ var host = document.querySelector("#shadow-host").createShadowRoot(); |
+ var template = document.querySelector("#shadow-template"); |
+ host.appendChild(template.content); |
+ template.remove(); |
+ runTest(); |
+ </script> |
+</body> |
+</html> |