<script>
  if (window.testRunner)
    testRunner.dumpAsText();
  console.log('This test PASS if it does not CRASH.')
  onload = async () => {
    for (let i = 0; i < 100; i++) {
      let documentTimeline = new DocumentTimeline();
      await caches.has('a');
      try {
        documentTimeline.animate(() => {});
      } catch(e) {
        // Catch flaky exception, so that it does not show up in dumped text.
      }
    }
  };
</script>
