Files
ladybird/Tests/LibWeb/Text/input/css/no-combinators-allowed-in-compound-selector-in-pseudos.html
Sam Atkins 68aa529a18 Tests: Add a test for combinators inside pseudo selectors
:host() and ::slotted() both take a `<compound-selector>` as their
argument, but we currently allow a sneaky combinator in there too, as
this demonstrates. That will be solved over subsequent commits, but
adding this now to track progress.
2026-04-08 15:53:02 +01:00

17 lines
524 B
HTML

<!DOCTYPE html>
<script src="../include.js"></script>
<script>
test(() => {
function test_invalid(selector) {
let supported = CSS.supports(`selector(${selector})`);
println(`${selector} is invalid: ${supported ? 'FAIL' : 'PASS'}`);
}
test_invalid("::slotted(> a)");
test_invalid("::slotted(+ a)");
test_invalid("::slotted(~ a)");
test_invalid(":host(> a)");
test_invalid(":host(+ a)");
test_invalid(":host(~ a)");
});
</script>