summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/motion/animation
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
commit086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch)
treea4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /testing/web-platform/tests/css/motion/animation
parentAdding debian version 124.0.1-1. (diff)
downloadfirefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz
firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/motion/animation')
-rw-r--r--testing/web-platform/tests/css/motion/animation/offset-path-interpolation-007.html124
-rw-r--r--testing/web-platform/tests/css/motion/animation/offset-rotate-interpolation-math-functions.html (renamed from testing/web-platform/tests/css/motion/animation/offset-rotate-interpolation-math-functions-tentative.html)4
-rw-r--r--testing/web-platform/tests/css/motion/animation/ray-angle-interpolation-math-functions.html47
3 files changed, 173 insertions, 2 deletions
diff --git a/testing/web-platform/tests/css/motion/animation/offset-path-interpolation-007.html b/testing/web-platform/tests/css/motion/animation/offset-path-interpolation-007.html
new file mode 100644
index 0000000000..6629f285d1
--- /dev/null
+++ b/testing/web-platform/tests/css/motion/animation/offset-path-interpolation-007.html
@@ -0,0 +1,124 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>offset-path interpolation with allow-discrete</title>
+ <link rel="help" href="https://drafts.fxtf.org/motion-1/#offset-path-property">
+ <meta name="assert" content="offset-path supports animation with allow-discrete.">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/css/support/interpolation-testcommon.js"></script>
+ </head>
+ <style>
+ .parent {
+ offset-path: circle(farthest-side);
+ }
+ .target {
+ offset-path: circle(10px);
+ }
+ </style>
+ <body>
+ <script>
+ 'use strict';
+
+ test_interpolation({
+ property: 'offset-path',
+ behavior: 'allow-discrete',
+ from: 'circle(10px)',
+ to: 'inset(20px)',
+ }, [
+ {at: -1, expect: 'circle(10px)'},
+ {at: 0, expect: 'circle(10px)'},
+ {at: 0.4, expect: 'circle(10px)'},
+ {at: 0.5, expect: 'inset(20px)'},
+ {at: 1, expect: 'inset(20px)'},
+ {at: 1.5, expect: 'inset(20px)'},
+ ]);
+
+ test_interpolation({
+ property: 'offset-path',
+ behavior: 'allow-discrete',
+ from: 'ellipse(at center)',
+ to: 'none',
+ }, [
+ {at: -1, expect: 'ellipse(at center)'},
+ {at: 0, expect: 'ellipse(at center)'},
+ {at: 0.4, expect: 'ellipse(at center)'},
+ {at: 0.5, expect: 'none'},
+ {at: 1, expect: 'none'},
+ {at: 1.5, expect: 'none'},
+ ]);
+
+ test_interpolation({
+ property: 'offset-path',
+ behavior: 'allow-discrete',
+ from: neutralKeyframe,
+ to: 'none',
+ }, [
+ {at: -1, expect: 'circle(10px)'},
+ {at: 0, expect: 'circle(10px)'},
+ {at: 0.4, expect: 'circle(10px)'},
+ {at: 0.5, expect: 'none'},
+ {at: 1, expect: 'none'},
+ {at: 1.5, expect: 'none'},
+ ]);
+
+ test_interpolation({
+ property: 'offset-path',
+ behavior: 'allow-discrete',
+ from: 'initial',
+ to: 'circle()',
+ }, [
+ {at: -1, expect: 'none'},
+ {at: 0, expect: 'none'},
+ {at: 0.4, expect: 'none'},
+ {at: 0.5, expect: 'circle()'},
+ {at: 1, expect: 'circle()'},
+ {at: 1.5, expect: 'circle()'},
+ ]);
+
+ test_interpolation({
+ property: 'offset-path',
+ behavior: 'allow-discrete',
+ from: 'inherit',
+ to: 'circle()',
+ }, [
+ {at: -0.1, expect: 'circle(farthest-side)'},
+ {at: 0, expect: 'circle(farthest-side)'},
+ {at: 0.4, expect: 'circle(farthest-side)'},
+ {at: 0.5, expect: 'circle()'},
+ {at: 1, expect: 'circle()'},
+ {at: 1.5, expect: 'circle()'},
+ ]);
+
+ test_interpolation({
+ property: 'offset-path',
+ behavior: 'allow-discrete',
+ from: 'unset',
+ to: 'inset(10%)',
+ }, [
+ {at: -0.1, expect: 'none'},
+ {at: 0, expect: 'none'},
+ {at: 0.4, expect: 'none'},
+ {at: 0.5, expect: 'inset(10%)'},
+ {at: 1, expect: 'inset(10%)'},
+ {at: 1.5, expect: 'inset(10%)'},
+ ]);
+
+ test_interpolation({
+ property: 'offset-path',
+ behavior: 'allow-discrete',
+ from: 'ray(0deg)',
+ to: 'url("abc")',
+ }, [
+ {at: -0.1, expect: 'ray(0deg)'},
+ {at: 0, expect: 'ray(0deg)'},
+ {at: 0.4, expect: 'ray(0deg)'},
+ {at: 0.5, expect: 'url("abc")'},
+ {at: 1, expect: 'url("abc")'},
+ {at: 1.5, expect: 'url("abc")'},
+ ]);
+
+ </script>
+ </body>
+</html>
diff --git a/testing/web-platform/tests/css/motion/animation/offset-rotate-interpolation-math-functions-tentative.html b/testing/web-platform/tests/css/motion/animation/offset-rotate-interpolation-math-functions.html
index 34e0abf2b0..c6be0a55d7 100644
--- a/testing/web-platform/tests/css/motion/animation/offset-rotate-interpolation-math-functions-tentative.html
+++ b/testing/web-platform/tests/css/motion/animation/offset-rotate-interpolation-math-functions.html
@@ -5,7 +5,7 @@
<title>offset-rotate interpolation with css math functions</title>
<link rel="author" title="Daniil Sakhapov" href="mailto:sakhapov@chromium.org">
<link rel="help" href="https://drafts.fxtf.org/motion-1/#offset-rotate-property">
- <link rel="help" href="https://drafts.csswg.org/css-values-5/#progress">
+ <link rel="help" href="https://drafts.csswg.org/css-values/#sign-funcs">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
@@ -33,7 +33,7 @@
test_interpolation({
property: 'offset-rotate',
from: 'calc(sign(20rem - 20px) * 100deg)',
- to: 'calc(progress(10rem from 20px to 100px) * 180deg)',
+ to: 'calc(sign(20rem - 20px) * 180deg)',
}, [
{at: -1, expect: '20deg'},
{at: 0, expect: '100deg'},
diff --git a/testing/web-platform/tests/css/motion/animation/ray-angle-interpolation-math-functions.html b/testing/web-platform/tests/css/motion/animation/ray-angle-interpolation-math-functions.html
new file mode 100644
index 0000000000..162adbc095
--- /dev/null
+++ b/testing/web-platform/tests/css/motion/animation/ray-angle-interpolation-math-functions.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>ray() angle interpolation with css math functions</title>
+ <link rel="author" title="Daniil Sakhapov" href="mailto:sakhapov@chromium.org">
+ <link rel="help" href="https://drafts.fxtf.org/motion/#offset-path-property">
+ <link rel="help" href="https://drafts.csswg.org/css-values/#sign-funcs">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/css/support/interpolation-testcommon.js"></script>
+ </head>
+ <style>
+ :root {
+ font-size: 10px;
+ }
+ </style>
+ <body>
+ <script>
+ test_interpolation({
+ property: 'offset-path',
+ from: 'ray(100deg)',
+ to: 'ray(calc(sign(20rem - 20px) * 180deg))',
+ }, [
+ {at: -1, expect: 'ray(20deg)'},
+ {at: 0, expect: 'ray(100deg)'},
+ {at: 0.125, expect: 'ray(110deg)'},
+ {at: 0.875, expect: 'ray(170deg)'},
+ {at: 1, expect: 'ray(180deg)'},
+ {at: 2, expect: 'ray(260deg)'}
+ ]);
+
+ test_interpolation({
+ property: 'offset-path',
+ from: 'ray(calc(sign(20rem - 20px) * 100deg))',
+ to: 'ray(calc(sign(20rem - 20px) * 180deg))',
+ }, [
+ {at: -1, expect: 'ray(20deg)'},
+ {at: 0, expect: 'ray(100deg)'},
+ {at: 0.125, expect: 'ray(110deg)'},
+ {at: 0.875, expect: 'ray(170deg)'},
+ {at: 1, expect: 'ray(180deg)'},
+ {at: 2, expect: 'ray(260deg)'}
+ ]);
+ </script>
+ </body>
+</html>