Chromium Code Reviews| 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..eccdf8be195fee94dc8a36f322a6114461a1d6e9 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element.html |
| @@ -0,0 +1,32 @@ |
| +<!DOCTYPE html> |
| +<html> |
|
rune
2016/01/09 01:15:36
We normally drop html/head/body.
kochi
2016/01/13 07:49:31
Done.
|
| +<head> |
| +<script src="resources/shadow-dom.js"></script> |
| +</head> |
| +<body> |
| +<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> |
| +</body> |
| +</html> |