0
Files
src/third_party/blink/web_tests/shadow-dom/css-cascade-slot-distributed.html
Kent Tamura 77578ccb40 The Great Blink mv for LayoutTests
This CL moves third_party/WebKit/LayoutTests to
third_party/blink/web_tests.

NOTRY=true
NOAUTOREVERT=true
NOPRESUBMIT=true
NOTREECHECKS=true
TBR=robertma@chromium.org

Bug: 843412
Change-Id: Ibb588b93d1579bcd1cb68df0a50efd8653f8724f
Reviewed-on: https://chromium-review.googlesource.com/c/1328627
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610740}
2018-11-25 22:33:43 +00:00

16 lines
802 B
HTML

<!DOCTYPE html>
<script src="../resources/js-test.js"></script>
<div id="host">
<span class="red" id="span">There should be no red</span>
</div>
<script>
description('Checking if styles in the nested shadow roots apply properly to distributed elements.');
var root = document.querySelector('#host').attachShadow({'mode': 'open'});
root.innerHTML = '<div><slot></slot></div><style>::slotted(.red) { color: green; }</style>';
var root2 = root.firstChild.attachShadow({'mode': 'open'});
root2.innerHTML = '<style>::slotted(.red) { background-color: green; color: red; }</style><slot></slot>';
var span = document.querySelector('#span');
shouldBeEqualToString('getComputedStyle(span).color', 'rgb(0, 128, 0)');
shouldBeEqualToString('getComputedStyle(span).backgroundColor', 'rgb(0, 128, 0)');
</script>