Index: LayoutTests/fast/dom/shadow/style-sharing-host-attribute.html |
diff --git a/LayoutTests/fast/dom/shadow/style-sharing-host-attribute.html b/LayoutTests/fast/dom/shadow/style-sharing-host-attribute.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f42411acc8932eaa8175f7aedcb8e4afbf315402 |
--- /dev/null |
+++ b/LayoutTests/fast/dom/shadow/style-sharing-host-attribute.html |
@@ -0,0 +1,21 @@ |
+<!DOCTYPE html> |
+<script src="../../../resources/js-test.js"></script> |
+<template> |
+ <style>:host([green]) { color: green }</style> |
+ <content></content> |
+</template> |
+<div> |
+ <div></div> |
+ <div green>This text should be green</div> |
+</div> |
+<script> |
+description("Don't share style between two hosts with different attribute matching for :host([])"); |
+ |
+var template = document.querySelector("template"); |
+ |
+var roots = document.querySelectorAll("div > div"); |
+for (var i = 0; i < roots.length; i++) |
+ roots[i].createShadowRoot().appendChild(document.importNode(template.content, true)); |
+ |
+shouldBe("getComputedStyle(roots[1]).color", "'rgb(0, 128, 0)'"); |
+</script> |