<div class="target"><span id="child1"></span></div>
<div class="target" style="display: contents;"><span id="child2"></span></div>
<script>
  for (const pseudo of ["::selection", "::target-text", "::search-text", "::spelling-error", "::grammar-error", "::highlight(foo)"]) {
    for (const child of [child1, child2]) {
      test(() => {
        let style = getComputedStyle(child, pseudo);
        assert_equals(style.backgroundColor, "rgb(0, 128, 0)", "Background color is green.");
        assert_equals(style