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

<!DOCTYPE html>
<meta name="viewport" content="width=device-width, user-scalable=no">
<link rel="stylesheet" type="text/css" href="resources/tablet.css">
<script src="resources/perf_test_helper.js"></script>

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

<script>
var N = PerfTestHelper.getN(1000);
var duration = 1000;
var style = null;

for (var i = 0; i < N; i++) {
  var target = document.createElement('target');
  container.appendChild(target);
}

var nextAnim = 0;
function updateStyle() {
  if (style) {
    style.remove();
  }
  anim = 'anim' + nextAnim++;
  style = document.createElement('style');
  style.textContent = '\
  target {\
    -webkit-animation: ' + anim + ' 1s linear infinite;\
  }\n\
  @-webkit-keyframes ' + anim + ' {\
    0% { opacity: 0; }\
    100% { opacity: 1; }\
  }';
  container.appendChild(style);
}

updateStyle();
setInterval(updateStyle, duration);

PerfTestHelper.signalReady();
</script>