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: third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-dynamic-attribute-change.html

Issue 1523843004: Add support for new CSS ::slotted() pseudo element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase / fix comments for tests (FYI) Created 4 years, 11 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/slotted-pseudo-element-dynamic-attribute-change.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-dynamic-attribute-change.html b/third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-dynamic-attribute-change.html
new file mode 100644
index 0000000000000000000000000000000000000000..f81b8d765d933f2e00060f0fcb54f79c606adb95
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-dynamic-attribute-change.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<title>::slotted pseudo elements with dynamic attribute change</title>
+<div id="host">
+ <div id="child">I should be green.</div>
+</div>
+<script>
+if (window.testRunner)
+ testRunner.waitUntilDone();
+
+var shadowRoot = document.getElementById('host').attachShadow({mode: 'open'});
+shadowRoot.innerHTML = '<style>slot::slotted(.selected) { ' +
+ 'background: green; }</style>' +
+ '<slot></slot>';
+
+setTimeout(function() {
+ document.getElementById('child').classList.add('selected');
+ if (window.testRunner)
+ testRunner.notifyDone();
+}, 0);
+</script>

Powered by Google App Engine
This is Rietveld 408576698