Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 160 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /css/css-view-transitions/parsing/pseudo-elements-valid-with-classes.html - WPT Dashboard Interop Dashboard
<!doctype html>
<meta charset="utf-8">
<title>Test pseudo elements parsing of valid selectors including classes</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
<script>
const functionPseudoElements = [
"::view-transition-group",
"::view-transition-image-pair",
"::view-transition-old",
"::view-transition-new",
];
function test_valid_selector_combinations(pseudo) {
test_valid_selector(pseudo);
test_valid_selector(`:root${pseudo}`);
test_valid_selector(`.a${pseudo}`);
test_valid_selector(`div ${pseudo}`);
}
test_valid_selector_combinations("::view-transition");
for (const functionName of functionPseudoElements) {
for (const validArgument of
["*.class", "*.class.class", "dashed-ident.someclass", "dash-id.dash-id", "foo.bar.baz"]) {
test_valid_selector_combinations(`${functionName}(${validArgument})`);
test_valid_selector_combinations(`${functionName}(${validArgument}):only-child`);
}
}
</script>