diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/css/css-animations/crashtests | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-animations/crashtests')
2 files changed, 85 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-animations/crashtests/add-pseudo-while-animating-001.html b/testing/web-platform/tests/css/css-animations/crashtests/add-pseudo-while-animating-001.html new file mode 100644 index 0000000000..dc815658c5 --- /dev/null +++ b/testing/web-platform/tests/css/css-animations/crashtests/add-pseudo-while-animating-001.html @@ -0,0 +1,43 @@ +<!DOCTYPE html> +<html class="test-wait"> +<head> +<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> +<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1267079"> +<style> + +@keyframes a { + 0% { + border-radius: 1px; + } +} + +div { + animation-name: a; + animation-duration: 3s; +} + +</style> +<script> + +function addSheet(text) +{ + var sheet = document.createElement("style"); + sheet.appendChild(document.createTextNode(text)); + document.head.appendChild(sheet); +} + +function boom() +{ + requestAnimationFrame(() => { requestAnimationFrame(() => { + addSheet("div:after { content: 'Z'; }"); + document.documentElement.classList.remove("test-wait"); + }); }); +} + +window.addEventListener("load", boom, false); + +</script> +</head> + +<body><div></div></body> +</html> diff --git a/testing/web-platform/tests/css/css-animations/crashtests/replace-keyframes-animating-filter-001.html b/testing/web-platform/tests/css/css-animations/crashtests/replace-keyframes-animating-filter-001.html new file mode 100644 index 0000000000..e6355376f7 --- /dev/null +++ b/testing/web-platform/tests/css/css-animations/crashtests/replace-keyframes-animating-filter-001.html @@ -0,0 +1,42 @@ +<!DOCTYPE html> +<html class="test-wait"> +<title>CSS Test (Animations): Changing an @keyframes that animates filter</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=1301937"> +<link rel="help" href="https://drafts.csswg.org/css-animations-1/#keyframes"> +<link rel="help" href="https://drafts.fxtf.org/filter-effects/#supported-filter-functions"> +<link rel="help" href="https://drafts.csswg.org/cssom-1/#the-cssstylesheet-interface"> +<meta name="assert" content="This should not crash."> + +<style> +#el1 { + height: 100px; + width: 100px; + animation: kf1 2s linear; +} +@keyframes kf1 { + from { filter: grayscale(0.9) } + to { filter: grayscale(0.8) } +} +</style> +<div id="el1"></div> +<script> + +document.documentElement.addEventListener("TestRendered", step1); + +function step1() { + requestAnimationFrame(function() { requestAnimationFrame(step2); }); +} + +function step2() { + let css = document.styleSheets[0]; + css.insertRule("@keyframes kf1 { from { color: blue } to { color: blue } } ", css.rules.length); + requestAnimationFrame(step3); +} + +function step3() { + document.documentElement.classList.remove("test-wait"); +} + +</script> |