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

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: tentative fix for crash / querySelector test 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/content-pseudo-element-dynamic-attribute-change.html b/third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-dynamic-attribute-change.html
similarity index 55%
copy from third_party/WebKit/LayoutTests/fast/dom/shadow/content-pseudo-element-dynamic-attribute-change.html
copy to third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-dynamic-attribute-change.html
index 6327c38a21d2d1520057a3476a88ab4c9d8177b8..f10d4518df9fb1a5a5a5fc7e257372602901e8d4 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/shadow/content-pseudo-element-dynamic-attribute-change.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-dynamic-attribute-change.html
@@ -1,25 +1,27 @@
<!DOCTYPE html>
<html>
<head>
-<title>::content pseudo elements with dynamic attribute change</title>
+<title>::slotted pseudo elements with dynamic attribute change</title>
</head>
<body>
<div id="host">
- <div id="child">I should be green.</div>
- </div>
+ <div id="child">I should be green.</div>
+</div>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
-var shadowRoot = document.getElementById('host').createShadowRoot();
-shadowRoot.innerHTML = '<style>content::content .selected { ' +
+
+var shadowRoot = document.getElementById('host').attachShadow({mode: 'open'});
+shadowRoot.innerHTML = '<style>slot::slotted(.selected) { ' +
'background: green; }</style>' +
- '<content></content>';
+ '<slot></slot>';
setTimeout(function() {
document.getElementById('child').classList.add('selected');
if (window.testRunner)
testRunner.notifyDone();
}, 0);
+
</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698