summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-masking/clip-path/animations/clip-path-interpolation-discrete.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/css-masking/clip-path/animations/clip-path-interpolation-discrete.html')
-rw-r--r--testing/web-platform/tests/css/css-masking/clip-path/animations/clip-path-interpolation-discrete.html124
1 files changed, 124 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-masking/clip-path/animations/clip-path-interpolation-discrete.html b/testing/web-platform/tests/css/css-masking/clip-path/animations/clip-path-interpolation-discrete.html
new file mode 100644
index 0000000000..9c14372006
--- /dev/null
+++ b/testing/web-platform/tests/css/css-masking/clip-path/animations/clip-path-interpolation-discrete.html
@@ -0,0 +1,124 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>clip-path interpolation with allow-discrete</title>
+ <link rel="help" href="https://drafts.fxtf.org/css-masking-1/#the-clip-path">
+ <meta name="assert" content="clip-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 {
+ clip-path: circle(farthest-side);
+ }
+ .target {
+ clip-path: circle(10px);
+ }
+ </style>
+ <body>
+ <script>
+ 'use strict';
+
+ test_interpolation({
+ property: 'clip-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: 'clip-path',
+ behavior: 'allow-discrete',
+ from: 'ellipse()',
+ to: 'padding-box',
+ }, [
+ {at: -1, expect: 'ellipse()'},
+ {at: 0, expect: 'ellipse()'},
+ {at: 0.4, expect: 'ellipse()'},
+ {at: 0.5, expect: 'padding-box'},
+ {at: 1, expect: 'padding-box'},
+ {at: 1.5, expect: 'padding-box'},
+ ]);
+
+ test_interpolation({
+ property: 'clip-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: 'clip-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: 'clip-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: 'clip-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: 'clip-path',
+ behavior: 'allow-discrete',
+ from: 'stroke-box',
+ to: 'url("abc")',
+ }, [
+ {at: -0.1, expect: 'stroke-box'},
+ {at: 0, expect: 'stroke-box'},
+ {at: 0.4, expect: 'stroke-box'},
+ {at: 0.5, expect: 'url("abc")'},
+ {at: 1, expect: 'url("abc")'},
+ {at: 1.5, expect: 'url("abc")'},
+ ]);
+
+ </script>
+ </body>
+</html>