Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-shared-style.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-shared-style.html b/third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-shared-style.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..681cf488c1c4844ab50258c8613343d265522ef3 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/dom/shadow/slotted-pseudo-element-shared-style.html |
| @@ -0,0 +1,26 @@ |
| +<!DOCTYPE html> |
| +<html> |
| +<head> |
| +<script src="resources/shadow-dom.js"></script> |
| +</head> |
| +<body> |
|
rune
2016/01/09 01:15:36
unnecessary html/head/body.
kochi
2016/01/13 07:49:31
Done.
|
| +<div id="sandbox"></div> |
| +<script> |
| +var shadowStyle = document.createElement('style'); |
| +shadowStyle.innerHTML = 'slot::slotted([data-color=red]) { color: red; }'; |
| + |
| +var sandbox = document.getElementById('sandbox'); |
| +sandbox.appendChild( |
| + createDOM('div', {}, |
| + attachShadow( |
| + {'mode': 'open'}, |
| + shadowStyle, |
| + createDOM('slot')), |
| + createDOM('div', {}, |
| + document.createTextNode('normal')), |
| + // If the style is falsely shared with the <div> above, this won't turn red. |
| + createDOM('div', {'data-color': 'red'}, |
| + document.createTextNode('red')))); |
| +</script> |
| +</body> |
| +</html> |