mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
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.
This commit is contained in:
Notes:
github-actions[bot]
2026-04-08 14:54:45 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/68aa529a185 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8830
@@ -0,0 +1,16 @@
|
||||
<!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>
|
||||
Reference in New Issue
Block a user