summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-animations/crashtests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/css/css-animations/crashtests
parentInitial commit. (diff)
downloadfirefox-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')
-rw-r--r--testing/web-platform/tests/css/css-animations/crashtests/add-pseudo-while-animating-001.html43
-rw-r--r--testing/web-platform/tests/css/css-animations/crashtests/replace-keyframes-animating-filter-001.html42
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>