diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/css/css-scoping/slotted-slot.html | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-scoping/slotted-slot.html')
-rw-r--r-- | testing/web-platform/tests/css/css-scoping/slotted-slot.html | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-scoping/slotted-slot.html b/testing/web-platform/tests/css/css-scoping/slotted-slot.html new file mode 100644 index 0000000000..1f4aa75ae6 --- /dev/null +++ b/testing/web-platform/tests/css/css-scoping/slotted-slot.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<title>CSS Test: ::slotted() not matching slot elements</title> +<link rel="author" title="Rune Lillesveen" href="mailto:futhark@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-scoping/#slotted-pseudo"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id="host" style="color:green">This text should be green.</div> +<script> + test(() => { + let root = host.attachShadow({mode:"open"}); + root.innerHTML = '<div><slot id="slot"></slot><div>'; + let innerHost = root.firstChild; + let innerRoot = innerHost.attachShadow({mode:"open"}); + innerRoot.innerHTML = "<style>::slotted(#slot){color:red}</style><slot></slot>"; + assert_equals(getComputedStyle(root.querySelector("#slot")).color, "rgb(0, 128, 0)"); + }, "Check that ::slotted does not match slot elements"); +</script> |