1
0
Fork 0
firefox/testing/web-platform/tests/css/css-conditional/at-supports-whitespace.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

39 lines
1.1 KiB
HTML

<!DOCTYPE html>
<title>Parsing of @supports with whitespace</title>
<link rel="help" href="https://drafts.csswg.org/css-conditional-3/#at-supports">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<main id=main></main>
<script>
let examples = [
'@supports ((a)) {}',
'@supports ((a) ) {}',
'@supports ( (a)) {}',
'@supports ( (a) ) {}',
'@supports (not (a)) {}',
'@supports (not (a) ) {}',
'@supports ( not (a)) {}',
'@supports ( not (a) ) {}',
'@supports ((a) and (b)) {}',
'@supports ((a) and (b) ) {}',
'@supports ( (a) and (b)) {}',
'@supports ( (a) and (b) ) {}',
'@supports ((a) or (b)) {}',
'@supports ((a) or (b) ) {}',
'@supports ( (a) or (b)) {}',
'@supports ( (a) or (b) ) {}',
];
for (let example of examples) {
test((t) => {
let style = document.createElement('style');
t.add_cleanup(() => style.remove());
style.textContent = example;
main.append(style);
assert_equals(style.sheet.rules.length, 1);
}, example);
}
</script>