Automatic update from web-platform-tests Move css-shadow-parts/ tests to css-shadow/part/ The css-shadow-parts spec is now part of css-shadow. Kept a separate directory to make it easier for the META.yml and feature mapping. Change-Id: I9d2572ad4f31d8dd7dd1aacf76209028c6a3d84a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7485890 Reviewed-by: Anders Hartvoll Ruud <andruud@chromium.org> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/main@{#1570431} -- wpt-commits: 680e4cf3fcabe4a6de1deb7fc36eb84d8278eedd wpt-pr: 57245
24 lines
867 B
HTML
24 lines
867 B
HTML
<!doctype html>
|
|
<title>CSS Shadow Parts test: Parts don't incorrectly share style with other elements</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-shadow/#part">
|
|
<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
|
|
<link rel="author" href="https://mozilla.org/" title="Mozilla">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<style>::part(part1) { color: green; }</style>
|
|
<div id="host"></div>
|
|
<script>
|
|
"use strict";
|
|
test(function() {
|
|
host.attachShadow({ mode: "open" }).innerHTML = `
|
|
<div></div>
|
|
<div part="part1"></div>
|
|
`;
|
|
assert_equals(
|
|
getComputedStyle(host.shadowRoot.querySelector("[part]")).color,
|
|
"rgb(0, 128, 0)",
|
|
"Part should be green",
|
|
);
|
|
}, "Part in selected host does not incorrectly share style with non-part");
|
|
</script>
|