chromium/tools/perf/page_sets/tough_animation_cases/css_transitions_staggered_chaining_by_updating_class.html

<!DOCTYPE html>
<meta name="viewport" content="width=device-width, user-scalable=no">
<link rel="stylesheet" type="text/css" href="resources/tablet.css">
<link rel="stylesheet" type="text/css" href="resources/transition.css">
<script src="resources/perf_test_helper.js"></script>
<style>
target {
  opacity: 0;
}
.keyframe0 {
  opacity: 0;
}
.keyframe1 {
  opacity: 1;
}
</style>

<container id="container"></container>

<script>
var N = PerfTestHelper.getN(1000);
var duration = 1000;
var keyframeValues = [0, 1];

for (var i = 0; i < N; i++) {
  var target = document.createElement('target');
  target._keyframe = 0;
  target.style.transitionDelay = (-i / N * duration) + 'ms';
  container.appendChild(target);
  target.addEventListener('transitionend', restartTransition);
}

function restartTransition(event) {
  event.target._keyframe ^= 1;
  event.target.className = 'keyframe' + event.target._keyframe;
  event.target.style.removeProperty('transition-delay');
}

requestAnimationFrame(function() {
  var styleRule = document.styleSheets[2].rules[0].style;
  styleRule.opacity = keyframeValues[1];
  requestAnimationFrame(function() {
    styleRule.opacity = keyframeValues[0];
  });
});

PerfTestHelper.signalReady();
</script>