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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element.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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-css-text.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element.html b/third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element.html
new file mode 100644
index 0000000000000000000000000000000000000000..26e2708760adf738d94361aade1c49b015694ae2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<script src="resources/shadow-dom.js"></script>
+<div id="sandbox"></div>
+<script>
+var shadowStyle = document.createElement('style');
+shadowStyle.innerHTML = '::slotted(div) { color: green; }'
+ + '::slotted(div.blue) { color: blue; }'
+ + 'slot::slotted(div#red) { color: red; }'
+ + 'slot::slotted(div[data-color=purple]) { color: purple; }';
+
+var sandbox = document.getElementById('sandbox');
+sandbox.appendChild(
+ createDOM('div', {},
+ attachShadow(
+ {'mode': 'open'},
+ shadowStyle,
+ createDOM('slot')),
+ createDOM('div', {},
+ document.createTextNode('green')),
+ createDOM('div', {class: 'blue'},
+ document.createTextNode('blue')),
+ createDOM('div', {id: 'red'},
+ document.createTextNode('red')),
+ createDOM('div', {'data-color': 'purple'},
+ document.createTextNode('purple'))));
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-css-text.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698