summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-values/calc-size/animation
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/css-values/calc-size/animation')
-rw-r--r--testing/web-platform/tests/css/css-values/calc-size/animation/calc-size-height-interpolation.tentative.html95
-rw-r--r--testing/web-platform/tests/css/css-values/calc-size/animation/calc-size-width-interpolation.tentative.html27
2 files changed, 115 insertions, 7 deletions
diff --git a/testing/web-platform/tests/css/css-values/calc-size/animation/calc-size-height-interpolation.tentative.html b/testing/web-platform/tests/css/css-values/calc-size/animation/calc-size-height-interpolation.tentative.html
new file mode 100644
index 0000000000..04c44d0904
--- /dev/null
+++ b/testing/web-platform/tests/css/css-values/calc-size/animation/calc-size-height-interpolation.tentative.html
@@ -0,0 +1,95 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<title>height: calc-size() animations</title>
+<link rel="help" href="https://drafts.csswg.org/css-values-5/#calc-size">
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../../../support/interpolation-testcommon.js"></script>
+
+<style>
+.target {
+ display: block;
+}
+.target::before {
+ display: block;
+ content: "";
+ width: 23px;
+ height: 100px;
+}
+</style>
+
+<body>
+
+<script>
+ test_interpolation({
+ property: 'height',
+ from: 'calc-size(auto, size)',
+ to: 'calc-size(auto, size * 2)',
+ }, [
+ { at: -0.25, expect: '75px' },
+ { at: 0, expect: '100px' },
+ { at: 0.25, expect: '125px' },
+ { at: 0.5, expect: '150px' },
+ { at: 0.75, expect: '175px' },
+ { at: 1, expect: '200px' },
+ { at: 1.25, expect: '225px' },
+ ]);
+
+ test_interpolation({
+ property: 'height',
+ from: neutralKeyframe,
+ to: 'calc-size(auto, size * 2)',
+ }, [
+ { at: -0.25, expect: '75px' },
+ { at: 0, expect: '100px' },
+ { at: 0.25, expect: '125px' },
+ { at: 0.5, expect: '150px' },
+ { at: 0.75, expect: '175px' },
+ { at: 1, expect: '200px' },
+ { at: 1.25, expect: '225px' },
+ ]);
+
+ test_interpolation({
+ property: 'height',
+ from: 'calc-size(min-content, 0 * size)',
+ to: 'calc-size(min-content, size)',
+ }, [
+ { at: -0.25, expect: '0' },
+ { at: 0, expect: '0' },
+ { at: 0.25, expect: '25px' },
+ { at: 0.5, expect: '50px' },
+ { at: 0.75, expect: '75px' },
+ { at: 1, expect: '100px' },
+ { at: 1.25, expect: '125px' },
+ ]);
+
+ test_interpolation({
+ property: 'height',
+ from: 'calc-size(min-content, 0px)',
+ to: 'calc-size(min-content, size)',
+ }, [
+ { at: -0.25, expect: '0' },
+ { at: 0, expect: '0' },
+ { at: 0.25, expect: '25px' },
+ { at: 0.5, expect: '50px' },
+ { at: 0.75, expect: '75px' },
+ { at: 1, expect: '100px' },
+ { at: 1.25, expect: '125px' },
+ ]);
+
+ test_interpolation({
+ property: 'height',
+ from: '0',
+ to: 'calc-size(max-content, size)',
+ }, [
+ { at: -0.25, expect: '0' },
+ { at: 0, expect: '0' },
+ { at: 0.25, expect: '25px' },
+ { at: 0.5, expect: '50px' },
+ { at: 0.75, expect: '75px' },
+ { at: 1, expect: '100px' },
+ { at: 1.25, expect: '125px' },
+ ]);
+
+</script>
diff --git a/testing/web-platform/tests/css/css-values/calc-size/animation/calc-size-width-interpolation.tentative.html b/testing/web-platform/tests/css/css-values/calc-size/animation/calc-size-width-interpolation.tentative.html
index 7254951db3..b8b24935c3 100644
--- a/testing/web-platform/tests/css/css-values/calc-size/animation/calc-size-width-interpolation.tentative.html
+++ b/testing/web-platform/tests/css/css-values/calc-size/animation/calc-size-width-interpolation.tentative.html
@@ -1,8 +1,7 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<title>width: calc-size() animations</title>
-<link rel="help" href="https://drafts.csswg.org/css-values-5/">
-<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/626#issuecomment-1800254442">
+<link rel="help" href="https://drafts.csswg.org/css-values-5/#calc-size">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
@@ -28,16 +27,30 @@
<script>
test_interpolation({
property: 'width',
+ from: 'calc-size(auto, size)',
+ to: 'calc-size(auto, size * 2)',
+ }, [
+ { at: -0.25, expect: '150px' },
+ { at: 0, expect: '200px' },
+ { at: 0.25, expect: '250px' },
+ { at: 0.5, expect: '300px' },
+ { at: 0.75, expect: '350px' },
+ { at: 1, expect: '400px' },
+ { at: 1.25, expect: '450px' },
+ ]);
+
+ test_interpolation({
+ property: 'width',
from: neutralKeyframe,
to: 'calc-size(auto, size * 2)',
}, [
{ at: -0.25, expect: '150px' },
{ at: 0, expect: '200px' },
- { at: 0.25, expect: 'calc-size(auto, size * 1.25)' },
- { at: 0.5, expect: 'calc-size(auto, size * 1.5)' },
- { at: 0.75, expect: 'calc-size(auto, size * 1.75)' },
- { at: 1, expect: 'calc-size(auto, size * 2)' },
- { at: 1.25, expect: 'calc-size(auto, size * 2.25)' },
+ { at: 0.25, expect: '250px' },
+ { at: 0.5, expect: '300px' },
+ { at: 0.75, expect: '350px' },
+ { at: 1, expect: '400px' },
+ { at: 1.25, expect: '450px' },
]);
test_interpolation({