summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-ui/animation
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/css/css-ui/animation
parentInitial commit. (diff)
downloadfirefox-upstream.tar.xz
firefox-upstream.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-ui/animation')
-rw-r--r--testing/web-platform/tests/css/css-ui/animation/accent-color-interpolation.html106
-rw-r--r--testing/web-platform/tests/css/css-ui/animation/caret-color-composition.html53
-rw-r--r--testing/web-platform/tests/css/css-ui/animation/caret-color-interpolation.html106
-rw-r--r--testing/web-platform/tests/css/css-ui/animation/outline-color-interpolation.html96
-rw-r--r--testing/web-platform/tests/css/css-ui/animation/outline-offset-composition.html65
-rw-r--r--testing/web-platform/tests/css/css-ui/animation/outline-offset-interpolation.html98
-rw-r--r--testing/web-platform/tests/css/css-ui/animation/outline-width-composition.html85
-rw-r--r--testing/web-platform/tests/css/css-ui/animation/outline-width-interpolation.html120
8 files changed, 729 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-ui/animation/accent-color-interpolation.html b/testing/web-platform/tests/css/css-ui/animation/accent-color-interpolation.html
new file mode 100644
index 0000000000..20d87c4e52
--- /dev/null
+++ b/testing/web-platform/tests/css/css-ui/animation/accent-color-interpolation.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<title>accent-color interpolation</title>
+<link rel="author" title="Joey Arhar" href="mailto:jarhar@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-ui-4/#widget-accent">
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/interpolation-testcommon.js"></script>
+
+<style>
+.parent {
+ accent-color: blue;
+}
+.target {
+ display: inline-block;
+ font-size: 60pt;
+ accent-color: yellow;
+}
+.expected {
+ margin-right: 15px;
+}
+</style>
+
+<body contenteditable>
+ <template id="target-template">T</template>
+</body>
+
+<script>
+test_interpolation({
+ property: 'accent-color',
+ from: neutralKeyframe,
+ to: 'green',
+}, [
+ {at: -0.3, expect: 'rgb(255, 255, 0)'},
+ {at: 0, expect: 'rgb(255, 255, 0)'},
+ {at: 0.3, expect: 'rgb(179, 217, 0)'},
+ {at: 0.6, expect: 'rgb(102, 179, 0)'},
+ {at: 1, expect: 'rgb(0, 128, 0)'},
+ {at: 1.5, expect: 'rgb(0, 65, 0)'},
+]);
+
+test_no_interpolation({
+ property: 'accent-color',
+ from: 'initial',
+ to: 'green',
+});
+
+test_no_interpolation({
+ property: 'accent-color',
+ from: 'auto',
+ to: 'green',
+});
+
+test_interpolation({
+ property: 'accent-color',
+ from: 'currentColor',
+ to: 'green',
+}, [
+ {at: -0.3, expect: 'rgb(0, 0, 0)'},
+ {at: 0, expect: 'rgb(0, 0, 0)'},
+ {at: 0.3, expect: 'rgb(0, 38, 0)'},
+ {at: 0.6, expect: 'rgb(0, 77, 0)'},
+ {at: 1, expect: 'rgb(0, 128, 0)'},
+ {at: 1.5, expect: 'rgb(0, 192, 0)'},
+]);
+
+test_interpolation({
+ property: 'accent-color',
+ from: 'inherit',
+ to: 'green',
+}, [
+ {at: -0.3, expect: 'rgb(0, 0, 255)'},
+ {at: 0, expect: 'rgb(0, 0, 255)'},
+ {at: 0.3, expect: 'rgb(0, 38, 179)'},
+ {at: 0.6, expect: 'rgb(0, 77, 102)'},
+ {at: 1, expect: 'rgb(0, 128, 0)'},
+ {at: 1.5, expect: 'rgb(0, 192, 0)'},
+]);
+
+test_interpolation({
+ property: 'accent-color',
+ from: 'unset',
+ to: 'green',
+}, [
+ {at: -0.3, expect: 'rgb(0, 0, 255)'},
+ {at: 0, expect: 'rgb(0, 0, 255)'},
+ {at: 0.3, expect: 'rgb(0, 38, 179)'},
+ {at: 0.6, expect: 'rgb(0, 77, 102)'},
+ {at: 1, expect: 'rgb(0, 128, 0)'},
+ {at: 1.5, expect: 'rgb(0, 192, 0)'},
+]);
+
+test_interpolation({
+ property: 'accent-color',
+ from: 'black',
+ to: 'orange',
+}, [
+ {at: -0.3, expect: 'rgb(0, 0, 0)'},
+ {at: 0, expect: 'rgb(0, 0, 0)'},
+ {at: 0.3, expect: 'rgb(77, 50, 0)'},
+ {at: 0.6, expect: 'rgb(153, 99, 0)'},
+ {at: 1, expect: 'rgb(255, 165, 0)'},
+ {at: 1.5, expect: 'rgb(255, 248, 0)'},
+]);
+</script>
diff --git a/testing/web-platform/tests/css/css-ui/animation/caret-color-composition.html b/testing/web-platform/tests/css/css-ui/animation/caret-color-composition.html
new file mode 100644
index 0000000000..6c69578677
--- /dev/null
+++ b/testing/web-platform/tests/css/css-ui/animation/caret-color-composition.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<title>caret-color composition</title>
+<link rel="help" href="https://drafts.csswg.org/css-ui-3/#propdef-caret-color">
+<meta name="assert" content="caret-color supports animation by computed value">
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/interpolation-testcommon.js"></script>
+
+<body>
+<style>
+.target {
+ display: inline-block;
+ font-size: 60pt;
+ color: rgb(50, 50, 50);
+}
+
+.expected {
+ margin-right: 15px;
+}
+</style>
+<body contenteditable>
+<template id="target-template">T</template>
+<script src="../interpolation/resources/interpolation-test.js"></script>
+<script>
+test_composition({
+ property: 'caret-color',
+ underlying: 'rgb(50, 50, 50)',
+ addFrom: 'rgb(100, 100, 100)',
+ addTo: 'rgb(200, 200, 200)',
+}, [
+ {at: -0.3, expect: 'rgb(120, 120, 120)'},
+ {at: 0, expect: 'rgb(150, 150, 150)'},
+ {at: 0.5, expect: 'rgb(200, 200, 200)'},
+ {at: 1, expect: 'rgb(250, 250, 250)'},
+ {at: 1.5, expect: 'rgb(255, 255, 255)'},
+]);
+
+test_composition({
+ property: 'caret-color',
+ underlying: 'auto',
+ addFrom: 'rgb(100, 100, 100)',
+ addTo: 'rgb(200, 200, 200)',
+}, [
+ {at: -0.3, expect: 'rgb(70, 70, 70)'},
+ {at: 0, expect: 'rgb(100, 100, 100)'},
+ {at: 0.5, expect: 'rgb(150, 150, 150)'},
+ {at: 1, expect: 'rgb(200, 200, 200)'},
+ {at: 1.5, expect: 'rgb(250, 250, 250)'},
+]);
+</script>
+</body>
diff --git a/testing/web-platform/tests/css/css-ui/animation/caret-color-interpolation.html b/testing/web-platform/tests/css/css-ui/animation/caret-color-interpolation.html
new file mode 100644
index 0000000000..b3a4e30130
--- /dev/null
+++ b/testing/web-platform/tests/css/css-ui/animation/caret-color-interpolation.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<title>caret-color interpolation</title>
+<link rel="help" href="https://drafts.csswg.org/css-ui-3/#propdef-caret-color">
+<meta name="assert" content="caret-color supports animation by computed value">
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/interpolation-testcommon.js"></script>
+
+<style>
+.parent {
+ caret-color: blue;
+}
+.target {
+ display: inline-block;
+ font-size: 60pt;
+ caret-color: yellow;
+}
+.expected {
+ margin-right: 15px;
+}
+</style>
+
+<body contenteditable>
+ <template id="target-template">T</template>
+</body>
+
+<script>
+test_interpolation({
+ property: 'caret-color',
+ from: neutralKeyframe,
+ to: 'green',
+}, [
+ {at: -0.3, expect: 'rgb(255, 255, 0)'},
+ {at: 0, expect: 'rgb(255, 255, 0)'},
+ {at: 0.3, expect: 'rgb(179, 217, 0)'},
+ {at: 0.6, expect: 'rgb(102, 179, 0)'},
+ {at: 1, expect: 'rgb(0, 128, 0)'},
+ {at: 1.5, expect: 'rgb(0, 65, 0)'},
+]);
+
+test_no_interpolation({
+ property: 'caret-color',
+ from: 'initial',
+ to: 'green',
+});
+
+test_no_interpolation({
+ property: 'caret-color',
+ from: 'auto',
+ to: 'green',
+});
+
+test_interpolation({
+ property: 'caret-color',
+ from: 'currentColor',
+ to: 'green',
+}, [
+ {at: -0.3, expect: 'rgb(0, 0, 0)'},
+ {at: 0, expect: 'rgb(0, 0, 0)'},
+ {at: 0.3, expect: 'rgb(0, 38, 0)'},
+ {at: 0.6, expect: 'rgb(0, 77, 0)'},
+ {at: 1, expect: 'rgb(0, 128, 0)'},
+ {at: 1.5, expect: 'rgb(0, 192, 0)'},
+]);
+
+test_interpolation({
+ property: 'caret-color',
+ from: 'inherit',
+ to: 'green',
+}, [
+ {at: -0.3, expect: 'rgb(0, 0, 255)'},
+ {at: 0, expect: 'rgb(0, 0, 255)'},
+ {at: 0.3, expect: 'rgb(0, 38, 179)'},
+ {at: 0.6, expect: 'rgb(0, 77, 102)'},
+ {at: 1, expect: 'rgb(0, 128, 0)'},
+ {at: 1.5, expect: 'rgb(0, 192, 0)'},
+]);
+
+test_interpolation({
+ property: 'caret-color',
+ from: 'unset',
+ to: 'green',
+}, [
+ {at: -0.3, expect: 'rgb(0, 0, 255)'},
+ {at: 0, expect: 'rgb(0, 0, 255)'},
+ {at: 0.3, expect: 'rgb(0, 38, 179)'},
+ {at: 0.6, expect: 'rgb(0, 77, 102)'},
+ {at: 1, expect: 'rgb(0, 128, 0)'},
+ {at: 1.5, expect: 'rgb(0, 192, 0)'},
+]);
+
+test_interpolation({
+ property: 'caret-color',
+ from: 'black',
+ to: 'orange',
+}, [
+ {at: -0.3, expect: 'rgb(0, 0, 0)'},
+ {at: 0, expect: 'rgb(0, 0, 0)'},
+ {at: 0.3, expect: 'rgb(77, 50, 0)'},
+ {at: 0.6, expect: 'rgb(153, 99, 0)'},
+ {at: 1, expect: 'rgb(255, 165, 0)'},
+ {at: 1.5, expect: 'rgb(255, 248, 0)'},
+]);
+</script>
diff --git a/testing/web-platform/tests/css/css-ui/animation/outline-color-interpolation.html b/testing/web-platform/tests/css/css-ui/animation/outline-color-interpolation.html
new file mode 100644
index 0000000000..f49aa79a38
--- /dev/null
+++ b/testing/web-platform/tests/css/css-ui/animation/outline-color-interpolation.html
@@ -0,0 +1,96 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<title>outline-color interpolation</title>
+<link rel="help" href="https://drafts.csswg.org/css-ui-3/#outline-color">
+<meta name="assert" content="outline-color supports animation by computed value">
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/interpolation-testcommon.js"></script>
+
+<style>
+.parent {
+ outline-color: yellow;
+}
+.target {
+ width: 50px;
+ height: 50px;
+ background-color: black;
+ display: inline-block;
+ outline: 12px solid white;
+ margin: 12px 12px;
+ outline-color: blue;
+}
+.expected {
+ background-color: lime;
+}
+</style>
+
+<body></body>
+
+<script>
+test_interpolation({
+ property: 'outline-color',
+ from: neutralKeyframe,
+ to: 'green',
+}, [
+ {at: -0.3, expect: 'rgb(0, 0, 255)'},
+ {at: 0, expect: 'rgb(0, 0, 255)'},
+ {at: 0.3, expect: 'rgb(0, 38, 179)'},
+ {at: 0.6, expect: 'rgb(0, 77, 102)'},
+ {at: 1, expect: 'rgb(0, 128, 0)'},
+ {at: 1.5, expect: 'rgb(0, 192, 0)'},
+]);
+
+test_interpolation({
+ property: 'outline-color',
+ from: 'initial',
+ to: 'green',
+}, [
+ {at: -0.3, expect: 'rgb(0, 0, 0)'},
+ {at: 0, expect: 'rgb(0, 0, 0)'},
+ {at: 0.3, expect: 'rgb(0, 38, 0)'},
+ {at: 0.6, expect: 'rgb(0, 77, 0)'},
+ {at: 1, expect: 'rgb(0, 128, 0)'},
+ {at: 1.5, expect: 'rgb(0, 192, 0)'},
+]);
+
+test_interpolation({
+ property: 'outline-color',
+ from: 'inherit',
+ to: 'green',
+}, [
+ {at: -0.3, expect: 'rgb(255, 255, 0)'},
+ {at: 0, expect: 'rgb(255, 255, 0)'},
+ {at: 0.3, expect: 'rgb(179, 217, 0)'},
+ {at: 0.6, expect: 'rgb(102, 179, 0)'},
+ {at: 1, expect: 'rgb(0, 128, 0)'},
+ {at: 1.5, expect: 'rgb(0, 65, 0)'},
+]);
+
+test_interpolation({
+ property: 'outline-color',
+ from: 'unset',
+ to: 'green',
+}, [
+ {at: -0.3, expect: 'rgb(0, 0, 0)'},
+ {at: 0, expect: 'rgb(0, 0, 0)'},
+ {at: 0.3, expect: 'rgb(0, 38, 0)'},
+ {at: 0.6, expect: 'rgb(0, 77, 0)'},
+ {at: 1, expect: 'rgb(0, 128, 0)'},
+ {at: 1.5, expect: 'rgb(0, 192, 0)'},
+]);
+
+test_interpolation({
+ property: 'outline-color',
+ from: 'white',
+ to: 'orange'
+}, [
+ {at: -0.3, expect: 'white'},
+ {at: 0, expect: 'white'},
+ {at: 0.3, expect: 'rgb(255, 228, 179)'},
+ {at: 0.6, expect: 'rgb(255, 201, 102)'},
+ {at: 1, expect: 'orange'},
+ {at: 1.5, expect: 'rgb(255, 120, 0)'},
+]);
+</script>
diff --git a/testing/web-platform/tests/css/css-ui/animation/outline-offset-composition.html b/testing/web-platform/tests/css/css-ui/animation/outline-offset-composition.html
new file mode 100644
index 0000000000..984a63fdc3
--- /dev/null
+++ b/testing/web-platform/tests/css/css-ui/animation/outline-offset-composition.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<title>outline-offset composition</title>
+<link rel="help" href="https://drafts.csswg.org/css-ui-3/#outline-offset">
+<meta name="assert" content="outline-offset supports animation by computed value">
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/interpolation-testcommon.js"></script>
+
+<body>
+<script>
+test_composition({
+ property: 'outline-offset',
+ underlying: '50px',
+ addFrom: '100px',
+ addTo: '200px',
+}, [
+ {at: -0.3, expect: '120px'},
+ {at: 0, expect: '150px'},
+ {at: 0.5, expect: '200px'},
+ {at: 1, expect: '250px'},
+ {at: 1.5, expect: '300px'},
+]);
+
+test_composition({
+ property: 'outline-offset',
+ underlying: '100px',
+ addFrom: '10px',
+ addTo: '2px',
+}, [
+ {at: -0.5, expect: '114px'},
+ {at: 0, expect: '110px'},
+ {at: 0.5, expect: '106px'},
+ {at: 1, expect: '102px'},
+ {at: 1.5, expect: '98px'},
+]);
+
+test_composition({
+ property: 'outline-offset',
+ underlying: '10em',
+ addFrom: '100px',
+ addTo: '20em',
+}, [
+ {at: -0.3, expect: 'calc(130px + 4em)'},
+ {at: 0, expect: 'calc(100px + 10em)'},
+ {at: 0.5, expect: 'calc(50px + 20em)'},
+ {at: 1, expect: '30em'},
+ {at: 1.5, expect: 'calc(-50px + 40em)'},
+]);
+
+test_composition({
+ property: 'outline-offset',
+ underlying: '50px',
+ addFrom: '100px',
+ replaceTo: '200px',
+}, [
+ {at: -0.3, expect: '135px'},
+ {at: 0, expect: '150px'},
+ {at: 0.5, expect: '175px'},
+ {at: 1, expect: '200px'},
+ {at: 1.5, expect: '225px'},
+]);
+</script>
+</body>
diff --git a/testing/web-platform/tests/css/css-ui/animation/outline-offset-interpolation.html b/testing/web-platform/tests/css/css-ui/animation/outline-offset-interpolation.html
new file mode 100644
index 0000000000..46c1c51c6e
--- /dev/null
+++ b/testing/web-platform/tests/css/css-ui/animation/outline-offset-interpolation.html
@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<title>outline-offset interpolation</title>
+<link rel="help" href="https://drafts.csswg.org/css-ui-3/#outline-offset">
+<meta name="assert" content="outline-offset supports animation by computed value">
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/interpolation-testcommon.js"></script>
+
+<style>
+.parent {
+ outline: solid 0px;
+ outline-offset: 30px;
+}
+.target {
+ width: 50px;
+ height: 50px;
+ background-color: black;
+ display: inline-block;
+ margin: 40px 0px 0px 40px;
+ outline: 4px solid orange;
+ outline-offset: 10px;
+}
+.expected {
+ background-color: green;
+ margin-right: 18px;
+}
+</style>
+
+<body></body>
+
+<script>
+test_interpolation({
+ property: 'outline-offset',
+ from: neutralKeyframe,
+ to: '20px',
+}, [
+ {at: -0.3, expect: '7px'},
+ {at: 0, expect: '10px'},
+ {at: 0.3, expect: '13px'},
+ {at: 0.6, expect: '16px'},
+ {at: 1, expect: '20px'},
+ {at: 1.5, expect: '25px'},
+]);
+
+test_interpolation({
+ property: 'outline-offset',
+ from: 'initial',
+ to: '20px',
+}, [
+ {at: -0.3, expect: '-6px'},
+ {at: 0, expect: '0px'},
+ {at: 0.3, expect: '6px'},
+ {at: 0.6, expect: '12px'},
+ {at: 1, expect: '20px'},
+ {at: 1.5, expect: '30px'},
+]);
+
+test_interpolation({
+ property: 'outline-offset',
+ from: 'inherit',
+ to: '20px',
+}, [
+ {at: -0.3, expect: '33px'},
+ {at: 0, expect: '30px'},
+ {at: 0.3, expect: '27px'},
+ {at: 0.6, expect: '24px'},
+ {at: 1, expect: '20px'},
+ {at: 1.5, expect: '15px'},
+]);
+
+test_interpolation({
+ property: 'outline-offset',
+ from: 'unset',
+ to: '20px',
+}, [
+ {at: -0.3, expect: '-6px'},
+ {at: 0, expect: '0px'},
+ {at: 0.3, expect: '6px'},
+ {at: 0.6, expect: '12px'},
+ {at: 1, expect: '20px'},
+ {at: 1.5, expect: '30px'},
+]);
+
+test_interpolation({
+ property: 'outline-offset',
+ from: '-5px',
+ to: '5px',
+}, [
+ {at: -0.3, expect: '-8px'},
+ {at: 0, expect: '-5px'},
+ {at: 0.3, expect: '-2px'},
+ {at: 0.6, expect: '1px'},
+ {at: 1, expect: '5px'},
+ {at: 1.5, expect: '10px'},
+]);
+</script>
diff --git a/testing/web-platform/tests/css/css-ui/animation/outline-width-composition.html b/testing/web-platform/tests/css/css-ui/animation/outline-width-composition.html
new file mode 100644
index 0000000000..b770feda61
--- /dev/null
+++ b/testing/web-platform/tests/css/css-ui/animation/outline-width-composition.html
@@ -0,0 +1,85 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<title>outline-width composition</title>
+<link rel="help" href="https://drafts.csswg.org/css-ui-3/#outline-width">
+<meta name="assert" content="outline-width supports animation by computed value">
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/interpolation-testcommon.js"></script>
+
+<body>
+<style>
+.target {
+ /* If outline-style is none (the default), the computed style of outline-width is 0. */
+ outline-style: solid;
+}
+</style>
+<script>
+test_composition({
+ property: 'outline-width',
+ underlying: '50px',
+ addFrom: '100px',
+ addTo: '200px',
+}, [
+ {at: -0.3, expect: '120px'},
+ {at: 0, expect: '150px'},
+ {at: 0.5, expect: '200px'},
+ {at: 1, expect: '250px'},
+ {at: 1.5, expect: '300px'},
+]);
+
+test_composition({
+ property: 'outline-width',
+ underlying: '100px',
+ addFrom: '10px',
+ addTo: '2px',
+}, [
+ {at: -0.5, expect: '114px'},
+ {at: 0, expect: '110px'},
+ {at: 0.5, expect: '106px'},
+ {at: 1, expect: '102px'},
+ {at: 1.5, expect: '98px'}, // Value clamping should happen after composition.
+]);
+
+test_composition({
+ property: 'outline-width',
+ underlying: '10em',
+ addFrom: '100px',
+ addTo: '20em',
+}, [
+ {at: -0.3, expect: 'calc(130px + 4em)'},
+ {at: 0, expect: 'calc(100px + 10em)'},
+ {at: 0.5, expect: 'calc(50px + 20em)'},
+ {at: 1, expect: '30em'},
+ {at: 1.5, expect: 'calc(-50px + 40em)'},
+]);
+
+test_composition({
+ property: 'outline-width',
+ underlying: '50px',
+ addFrom: '100px',
+ replaceTo: '200px',
+}, [
+ {at: -0.3, expect: '135px'},
+ {at: 0, expect: '150px'},
+ {at: 0.5, expect: '175px'},
+ {at: 1, expect: '200px'},
+ {at: 1.5, expect: '225px'},
+]);
+
+test_composition({
+ property: 'outline-width',
+ underlying: 'thick', // 5px
+ addFrom: '11px',
+ addTo: 'thin', // 1px
+}, [
+ {at: -0.3, expect: '19px'},
+ {at: 0, expect: '16px'},
+ {at: 0.5, expect: '11px'},
+ {at: 1, expect: '6px'},
+ {at: 1.5, expect: '1px'},
+ {at: 2, expect: '0px'}, // CSS outline-width can't be negative.
+]);
+</script>
+</body>
diff --git a/testing/web-platform/tests/css/css-ui/animation/outline-width-interpolation.html b/testing/web-platform/tests/css/css-ui/animation/outline-width-interpolation.html
new file mode 100644
index 0000000000..a46907a169
--- /dev/null
+++ b/testing/web-platform/tests/css/css-ui/animation/outline-width-interpolation.html
@@ -0,0 +1,120 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<title>outline-width interpolation</title>
+<link rel="help" href="https://drafts.csswg.org/css-ui-3/#outline-width">
+<meta name="assert" content="outline-width supports animation by computed value">
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/interpolation-testcommon.js"></script>
+
+<style>
+.parent {
+ outline: solid transparent;
+ outline-width: 30px;
+}
+.target {
+ width: 50px;
+ height: 50px;
+ background-color: black;
+ display: inline-block;
+ margin: 18px;
+ outline: solid orange;
+ outline-width: 10px;
+ opacity: 0.5;
+}
+.expected {
+ background-color: green;
+}
+</style>
+
+<body></body>
+
+<script>
+// NOTE: The below tests make assumptions about the values of medium (for unset
+// and initial) and thick, namely that:
+// * medium=3px
+// * thick=3px
+//
+// A better version of these tests would dynamically generate the expected values
+// by querying the computed style from the UA.
+
+test_interpolation({
+ property: 'outline-width',
+ from: neutralKeyframe,
+ to: '20px',
+}, [
+ {at: -0.3, expect: '7px'},
+ {at: 0, expect: '10px'},
+ {at: 0.3, expect: '13px'},
+ {at: 0.6, expect: '16px'},
+ {at: 1, expect: '20px'},
+ {at: 1.5, expect: '25px'},
+]);
+
+test_interpolation({
+ property: 'outline-width',
+ from: 'initial',
+ to: '23px',
+}, [
+ {at: -0.3, expect: '0px'},
+ {at: 0, expect: '3px'},
+ {at: 0.3, expect: '9px'},
+ {at: 0.6, expect: '15px'},
+ {at: 1, expect: '23px'},
+ {at: 1.5, expect: '33px'},
+]);
+
+test_interpolation({
+ property: 'outline-width',
+ from: 'inherit',
+ to: '20px',
+}, [
+ {at: -0.3, expect: '33px'},
+ {at: 0, expect: '30px'},
+ {at: 0.3, expect: '27px'},
+ {at: 0.6, expect: '24px'},
+ {at: 1, expect: '20px'},
+ {at: 1.5, expect: '15px'},
+]);
+
+test_interpolation({
+ property: 'outline-width',
+ from: 'unset',
+ to: '23px',
+}, [
+ {at: -0.3, expect: '0px'},
+ {at: 0, expect: '3px'},
+ {at: 0.3, expect: '9px'},
+ {at: 0.6, expect: '15px'},
+ {at: 1, expect: '23px'},
+ {at: 1.5, expect: '33px'},
+]);
+
+test_interpolation({
+ property: 'outline-width',
+ from: '0px',
+ to: '10px',
+}, [
+ {at: -0.3, expect: '0px'}, // CSS outline-width can't be negative.
+ {at: 0, expect: '0px'},
+ {at: 0.3, expect: '3px'},
+ {at: 0.6, expect: '6px'},
+ {at: 1, expect: '10px'},
+ {at: 1.5, expect: '15px'}
+]);
+
+test_interpolation({
+ property: 'outline-width',
+ from: 'thick',
+ to: '15px',
+}, [
+ {at: -2, expect: '0px'}, // CSS outline-width can't be negative.
+ {at: -0.3, expect: '2px'},
+ {at: 0, expect: '5px'},
+ {at: 0.3, expect: '8px'},
+ {at: 0.6, expect: '11px'},
+ {at: 1, expect: '15px'},
+ {at: 1.5, expect: '20px'}
+]);
+</script>