wpt / css / css-pseudo / parsing / highlight-pseudos.html

Status: FAIL | Duration: 96ms | Subtests: 0/40 | Open test on wpt.live | wpt.fyi

Data from commit:
a50cb89 wpt: run reference-named files which are themselves tests (#836) (2026-09-03)

SubtestStatusMessage
"::selection" should be a valid selectorFAILCannot destructure 'undefined' value
".a::selection" should be a valid selectorFAILCannot destructure 'undefined' value
"div ::selection" should be a valid selectorFAILCannot destructure 'undefined' value
"::part(my-part)::selection" should be a valid selectorFAILCannot destructure 'undefined' value
"::before::selection" should be an invalid selectorFAILassert_throws_dom: "::before::selection" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
"::selection.a" should be an invalid selectorFAILassert_throws_dom: "::selection.a" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
"::selection div" should be an invalid selectorFAILassert_throws_dom: "::selection div" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
"::selection::after" should be an invalid selectorFAILassert_throws_dom: "::selection::after" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
"::selection:hover" should be an invalid selectorFAILassert_throws_dom: "::selection:hover" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
":not(::selection)" should be an invalid selectorFAILassert_throws_dom: ":not(::selection)" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
"::target-text" should be a valid selectorFAIL"::target-text" is not a valid selector
".a::target-text" should be a valid selectorFAIL".a::target-text" is not a valid selector
"div ::target-text" should be a valid selectorFAIL"div ::target-text" is not a valid selector
"::part(my-part)::target-text" should be a valid selectorFAIL"::part(my-part)::target-text" is not a valid selector
"::before::target-text" should be an invalid selectorFAILassert_throws_dom: "::before::target-text" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
"::target-text.a" should be an invalid selectorFAILassert_throws_dom: "::target-text.a" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
"::target-text div" should be an invalid selectorFAILassert_throws_dom: "::target-text div" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
"::target-text::after" should be an invalid selectorFAILassert_throws_dom: "::target-text::after" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
"::target-text:hover" should be an invalid selectorFAILassert_throws_dom: "::target-text:hover" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
":not(::target-text)" should be an invalid selectorFAILassert_throws_dom: ":not(::target-text)" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
"::spelling-error" should be a valid selectorFAIL"::spelling-error" is not a valid selector
".a::spelling-error" should be a valid selectorFAIL".a::spelling-error" is not a valid selector
"div ::spelling-error" should be a valid selectorFAIL"div ::spelling-error" is not a valid selector
"::part(my-part)::spelling-error" should be a valid selectorFAIL"::part(my-part)::spelling-error" is not a valid selector
"::before::spelling-error" should be an invalid selectorFAILassert_throws_dom: "::before::spelling-error" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
"::spelling-error.a" should be an invalid selectorFAILassert_throws_dom: "::spelling-error.a" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
"::spelling-error div" should be an invalid selectorFAILassert_throws_dom: "::spelling-error div" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
"::spelling-error::after" should be an invalid selectorFAILassert_throws_dom: "::spelling-error::after" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
"::spelling-error:hover" should be an invalid selectorFAILassert_throws_dom: "::spelling-error:hover" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
":not(::spelling-error)" should be an invalid selectorFAILassert_throws_dom: ":not(::spelling-error)" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
"::grammar-error" should be a valid selectorFAIL"::grammar-error" is not a valid selector
".a::grammar-error" should be a valid selectorFAIL".a::grammar-error" is not a valid selector
"div ::grammar-error" should be a valid selectorFAIL"div ::grammar-error" is not a valid selector
"::part(my-part)::grammar-error" should be a valid selectorFAIL"::part(my-part)::grammar-error" is not a valid selector
"::before::grammar-error" should be an invalid selectorFAILassert_throws_dom: "::before::grammar-error" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
"::grammar-error.a" should be an invalid selectorFAILassert_throws_dom: "::grammar-error.a" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
"::grammar-error div" should be an invalid selectorFAILassert_throws_dom: "::grammar-error div" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
"::grammar-error::after" should be an invalid selectorFAILassert_throws_dom: "::grammar-error::after" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
"::grammar-error:hover" should be an invalid selectorFAILassert_throws_dom: "::grammar-error:hover" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12
":not(::grammar-error)" should be an invalid selectorFAILassert_throws_dom: ":not(::grammar-error)" should throw in insertRule function "() => sheet.insertRule(selector + "{}")" threw object "TypeError: cannot convert 'null' or 'undefined' to object" that is not a DOMException 12: property "code" is equal to undefined, expected 12

/css/css-pseudo/parsing/highlight-pseudos.html

<!doctype html>
<meta charset="utf-8">
<title>CSS Pseudo-Elements Test: highlight selectors parsing</title>
<link rel="help" href="https://drafts.csswg.org/css-pseudo/#highlight-selectors">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
<script>
  for (const pseudo of ["::selection", "::target-text", "::spelling-error", "::grammar-error"]) {
    test_valid_selector(`${pseudo}`);
    test_valid_selector(`.a${pseudo}`);
    test_valid_selector(`div ${pseudo}`);
    test_valid_selector(`::part(my-part)${pseudo}`);

    test_invalid_selector(`::before${pseudo}`);
    test_invalid_selector(`${pseudo}.a`);
    test_invalid_selector(`${pseudo} div`);
    test_invalid_selector(`${pseudo}::after`);
    test_invalid_selector(`${pseudo}:hover`);
    test_invalid_selector(`:not(${pseudo})`);
  }
</script>