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

Unified Diff: LayoutTests/fast/dom/shadow/outer-scope-lower-specificity-wins.html

Issue 1298173004: Implement proposed shadow tree cascade order. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed review issues Created 5 years, 4 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/dom/shadow/outer-scope-lower-specificity-wins.html
diff --git a/LayoutTests/fast/dom/shadow/outer-scope-lower-specificity-wins.html b/LayoutTests/fast/dom/shadow/outer-scope-lower-specificity-wins.html
new file mode 100644
index 0000000000000000000000000000000000000000..ab1459552928edc7e93d9a7515992763c9bcc761
--- /dev/null
+++ b/LayoutTests/fast/dom/shadow/outer-scope-lower-specificity-wins.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<script src="resources/shadow-dom.js"></script>
+<div id="sandbox"></div>
+<script>
+description("Outer scope rules wins, even with lower specificity.");
+
+sandbox.appendChild(
+ createDOM('div', {'id': 'host'},
+ createShadowRoot(
+ createDOM('style', {},
+ document.createTextNode(
+ '::content #target { color: red; }')),
+ createDOM('content', {})),
+ createDOM('style', {},
+ document.createTextNode(
+ 'span { color: green; }')),
+ createDOM('span', {'id': 'target'})));
+
+shouldBeEqualToString("getComputedStyle(target).color", "rgb(0, 128, 0)");
+</script>

Powered by Google App Engine
This is Rietveld 408576698