summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-values/calc-size/animation/calc-size-height-interpolation.tentative.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
commita90a5cba08fdf6c0ceb95101c275108a152a3aed (patch)
tree532507288f3defd7f4dcf1af49698bcb76034855 /testing/web-platform/tests/css/css-values/calc-size/animation/calc-size-height-interpolation.tentative.html
parentAdding debian version 126.0.1-1. (diff)
downloadfirefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz
firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-values/calc-size/animation/calc-size-height-interpolation.tentative.html')
-rw-r--r--testing/web-platform/tests/css/css-values/calc-size/animation/calc-size-height-interpolation.tentative.html41
1 files changed, 40 insertions, 1 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
index 06277376e9..6d15c3f226 100644
--- 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
@@ -180,7 +180,7 @@
test_interpolation({
property: 'height',
from: 'calc-size(37px, 200px)',
- to: `calc-size(37px, size * 2 + 3% + 17px)`, /* adds to 100px */
+ to: 'calc-size(37px, size * 2 + 3% + 17px)', /* adds to 100px */
}, [
{ at: -0.25, expect: '225px' },
{ at: 0, expect: '200px' },
@@ -189,4 +189,43 @@
{ at: 1.25, expect: '75px' },
]);
+ test_interpolation({
+ property: 'height',
+ from: 'calc-size(auto, size)',
+ to: '50%',
+ }, [
+ { at: -0.25, expect: '87.5px' },
+ { at: 0, expect: '100px' },
+ { at: 0.75, expect: '137.5px' },
+ { at: 1, expect: '150px' },
+ { at: 1.25, expect: '162.5px' },
+ ]);
+
+ // Rerun roughly the same test with an auto height container.
+ let auto_style_text = `
+ .parent {
+ height: auto;
+ }
+ `;
+ let auto_style_element = document.createElement("style");
+ auto_style_element.append(document.createTextNode(auto_style_text));
+ document.head.append(auto_style_element);
+
+ test_interpolation({
+ property: 'height',
+ from: 'calc-size(auto, size * 2)',
+ to: '50%',
+ }, [
+ { at: -0.25, expect: '250px' },
+ { at: 0, expect: '200px' },
+ { at: 0.75, expect: '50px' },
+ /* TODO(https://crbug.com/40339056): It's questionable whether this should
+ * be the case, particularly for transitions. Perhaps the value at the
+ * end should have its percentage-ness back and be 100px here? */
+ { at: 1, expect: '0px' },
+ { at: 1.25, expect: '0px' },
+ ]);
+
+ auto_style_element.remove();
+
</script>