Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>Parsing of @supports with whitespace</title>
<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>