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

Unified Diff: LayoutTests/fast/dom/shadow/inner-scope-important-wins.html

Issue 1224673002: Implement proposed shadow tree cascade order. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added documentation 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/inner-scope-important-wins.html
diff --git a/LayoutTests/fast/dom/shadow/inner-scope-important-wins.html b/LayoutTests/fast/dom/shadow/inner-scope-important-wins.html
new file mode 100644
index 0000000000000000000000000000000000000000..a4e004f8ebe4691a94c3781c12848a425c6c6018
--- /dev/null
+++ b/LayoutTests/fast/dom/shadow/inner-scope-important-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("Inner scope !important rules wins, even with lower specificity.");
+
+sandbox.appendChild(
+ createDOM('div', {'id': 'host'},
+ createShadowRoot(
+ createDOM('style', {},
+ document.createTextNode(
+ '::content span { color: green !important; }')),
+ createDOM('content', {})),
+ createDOM('style', {},
+ document.createTextNode(
+ '#target { color: red !important; }')),
+ createDOM('span', {'id': 'target'})));
+
+shouldBeEqualToString("getComputedStyle(target).color", "rgb(0, 128, 0)");
+</script>

Powered by Google App Engine
This is Rietveld 408576698