chromium/third_party/blink/web_tests/fast/dom/resources/raf-throttling-frame.html

<!DOCTYPE html>

<!-- Counts the number of animation frames that have been served to this frame. -->
<script>
let rafCount = 0;
function raf() {
  rafCount++;
  requestAnimationFrame(raf);
};

addEventListener('load', () => {
  // Once we've completed loading, try requesting RAFs.
  requestAnimationFrame(raf);
});

addEventListener('message', (e) => {
  e.source.postMessage(rafCount, e.origin);
});
</script>