chromium/third_party/blink/web_tests/external/wpt/css/selectors/invalidation/nth-child-whole-subtree.html

<!DOCTYPE html>
<title>CSS Selectors Invalidation: :nth-child(... of :not()) combined with whole subtree invalidation</title>
<link rel="help" href="https://crbug.com/333420613">
<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
  div:nth-child(odd of :not(.c)) {
    background-color: silver;
  }
  .c * {}
</style>
<div>Silver</div>
<div id="d2" class="c">White</div>
<div id="d3">Silver</div>
<script>
  test(() => {
    document.body.offsetTop;
    d2.classList.value = '';
    assert_equals(getComputedStyle(d3).backgroundColor, 'rgb(192, 192, 192)');
  });
</script>