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

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

Issue 1803933002: Use correct cascading order for Shadow DOM v1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix enum Created 4 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: third_party/WebKit/LayoutTests/fast/dom/shadow/inner-scope-important-wins.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/inner-scope-important-wins.html b/third_party/WebKit/LayoutTests/fast/dom/shadow/inner-scope-important-wins.html
new file mode 100644
index 0000000000000000000000000000000000000000..d3f79f1b7b93e0a097b247c874effca3c4fefb8d
--- /dev/null
+++ b/third_party/WebKit/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('Outer scope !important rules wins with higher specificity (v0 bug compatibility).');
+
+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(255, 0, 0)');
+</script>

Powered by Google App Engine
This is Rietveld 408576698