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

Unified Diff: third_party/WebKit/LayoutTests/shadow-dom/cascade-slot-distributed.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/shadow-dom/cascade-slot-distributed.html
diff --git a/third_party/WebKit/LayoutTests/shadow-dom/cascade-slot-distributed.html b/third_party/WebKit/LayoutTests/shadow-dom/cascade-slot-distributed.html
new file mode 100644
index 0000000000000000000000000000000000000000..557548d3fb67cd953d240243e1befe4ceeb1d063
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/shadow-dom/cascade-slot-distributed.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<script src="../resources/js-test.js"></script>
+<div id="host">
+ <span class="red" id="span">There should be no red</span>
+</div>
+<script>
+description('Checking if styles in the nested shadow roots apply properly to distributed elements.');
+var root = document.querySelector('#host').attachShadow({'mode': 'open'});
+root.innerHTML = '<div><slot></slot></div><style>::slotted(.red) { color: green; }</style>';
+var root2 = root.firstChild.attachShadow({'mode': 'open'});
+root2.innerHTML = '<style>::slotted(.red) { background-color: green; color: red; }</style><slot></slot>';
+var span = document.querySelector('#span');
+shouldBeEqualToString('getComputedStyle(span).color', 'rgb(0, 128, 0)');
+shouldBeEqualToString('getComputedStyle(span).backgroundColor', 'rgb(0, 128, 0)');
+</script>

Powered by Google App Engine
This is Rietveld 408576698