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

Unified Diff: LayoutTests/fast/css/style-scoped/style-scoped-nested.html

Issue 216543002: Revert of Remove applyAuthorStyles flag from ShadowRoot. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698