Index: LayoutTests/fast/css/style-scoped/style-scoped-nested.html |
diff --git a/LayoutTests/fast/css/style-scoped/style-scoped-nested.html b/LayoutTests/fast/css/style-scoped/style-scoped-nested.html |
index 7145fd23ec15d0b6d8d6ec36d1c8385a0147cd56..2be3d14a70df514890863b36175dcda6a2dff496 100644 |
--- a/LayoutTests/fast/css/style-scoped/style-scoped-nested.html |
+++ b/LayoutTests/fast/css/style-scoped/style-scoped-nested.html |
@@ -42,5 +42,16 @@ |
debug("A new scoped style is inserted into the parent node of the target. A tag rule in the inserted scoped style wins an id rule and a class rule in existing styles."); |
shouldBe("window.getComputedStyle(target).color", '"rgb(0, 0, 255)"'); |
+var shadowRoot = target.createShadowRoot(); |
+shadowRoot.innerHTML = '<span id="targetInShadow" class="target"></span>'; |
+var targetInShadow = shadowRoot.getElementById("targetInShadow"); |
+shadowRoot.applyAuthorStyles = true; |
+ |
+var styleInShadow = document.createElement("style"); |
+styleInShadow.innerHTML = "span { color: lime; }"; |
+shadowRoot.appendChild(styleInShadow); |
+debug("Append a new style element to the shadow root. The style's scoping element is the shadow root. Rules in the style should override other rules in ascendant (scoped) styles."); |
+shouldBe("window.getComputedStyle(targetInShadow).color", '"rgb(0, 255, 0)"'); |
+ |
</script> |
</html> |