chromium/third_party/blink/web_tests/paint/invalidation/selection/selection-and-text-repaint.html

<!DOCTYPE html>
<style>
    ::selection { color: red }
    .green { color: green }
</style>
<p id="t1">This text should be green.</p>
<script>
    if (window.testRunner)
        testRunner.waitUntilDone();

    requestAnimationFrame(() => {
        t1.className = "green";
        if (window.testRunner)
            testRunner.notifyDone();
    });
</script>