testing/web-platform/tests/web-animations/crashtests/reparent-animating-element-001.html
author Cosmin Sabou <csabou@mozilla.com>
Sat, 12 Jul 2025 09:18:08 +0300 (3 hours ago)
changeset 796290 5ad1f0c58c82bdfa2f42fed870bbe143465398d0
parent 611284 b1aaff09c42b1cd52b982469e36c557c40ccc189
permissions -rw-r--r--
Revert "Bug 1977019 - re-enable hw video decoding testing. r=media-playback-reviewers,jolin" for causing win mda failures on test_hw_video_decoding.html This reverts commit 158474bdc0cf585b701bc47921f0a7d84f7bb84d.
<!DOCTYPE html>
<html class="test-wait">
<title>CSS Test (Animations): Reparenting an element with a web animation on the compositor</title>
<link rel="author" title="L. David Baron" href="https://dbaron.org/">
<link rel="author" title="Google" href="http://www.google.com/">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1301838">
<meta name="assert" content="This should not crash.">

<style>
#animate {
  width: 100px;
  height: 100px;
  background: blue;
}
</style>
<div id="animate"></div>
<div id="newparent"></div>
<script>

document.getElementById("animate").animate(
  [
    { transform: "rotate(0deg)" },
    { transform: "rotate(360deg)" }
  ],
  {
    duration: 5000,
    iterations: Infinity
  }
);

requestAnimationFrame(function() {
  requestAnimationFrame(function() {
    document.getElementById("newparent").appendChild(document.getElementById("animate"));
    requestAnimationFrame(function() {
      document.documentElement.classList.remove("test-wait");
    });
  });
});

</script>