diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:47:29 +0000 |
commit | 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch) | |
tree | a31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /testing/web-platform/tests/web-animations/crashtests/reparent-animating-element-002.html | |
parent | Initial commit. (diff) | |
download | firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.tar.xz firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.zip |
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/web-animations/crashtests/reparent-animating-element-002.html')
-rw-r--r-- | testing/web-platform/tests/web-animations/crashtests/reparent-animating-element-002.html | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/testing/web-platform/tests/web-animations/crashtests/reparent-animating-element-002.html b/testing/web-platform/tests/web-animations/crashtests/reparent-animating-element-002.html new file mode 100644 index 0000000000..0d3549fc33 --- /dev/null +++ b/testing/web-platform/tests/web-animations/crashtests/reparent-animating-element-002.html @@ -0,0 +1,44 @@ +<!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=1305487"> +<meta name="assert" content="This should not crash."> +<!-- + +The Chromium implementation of <marquee> essentially uses web animations +underneath. However, I was unable to make a testcase for this crash +that uses web animations directly. Despite that, it still seems worth +adding this testcase here in WPT. + +--> + +<style> +#animate { + width: 100px; + height: 100px; +} +#newparent { + display: none; +} +</style> +<marquee id="animate">X</marquee> +<div id="newparent"></div> +<script> + +let a = document.getElementById("animate"); + +requestAnimationFrame(function() { + // use setTimeout because the crash doesn't happen if we do this inside + // a requestAnimationFrame callback + setTimeout(function() { + a.remove(); + document.getElementById("newparent").appendChild(a); + requestAnimationFrame(function() { + document.documentElement.classList.remove("test-wait"); + }); + }, 0); +}); + +</script> |