From 7b161220570775397e9f7875d6f04185c6496135 Mon Sep 17 00:00:00 2001 From: Antoine Quint Date: Sun, 3 Oct 2021 10:17:03 +0000 Subject: [PATCH] Bug 1731320 [wpt PR 30823] - Test that float values are correctly produced while interpolating box-shadow and text-shadow, a=testonly Automatic update from web-platform-tests Test that float values are correctly produced while interpolating box-shadow and text-shadow values, added for WebKit bug https://bugs.webkit.org/show_bug.cgi?id=230347. (#30823) -- wpt-commits: 26847f2178f0598973b312ab926abc9f9c3e28a8 wpt-pr: 30823 --- .../animations/box-shadow-interpolation.html | 13 +++++++++++++ .../animations/text-shadow-interpolation.html | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/testing/web-platform/tests/css/css-backgrounds/animations/box-shadow-interpolation.html b/testing/web-platform/tests/css/css-backgrounds/animations/box-shadow-interpolation.html index d99e08faf137e..d6c438737d119 100644 --- a/testing/web-platform/tests/css/css-backgrounds/animations/box-shadow-interpolation.html +++ b/testing/web-platform/tests/css/css-backgrounds/animations/box-shadow-interpolation.html @@ -94,6 +94,19 @@ {at: 1.5, expect: 'rgb(255, 248, 0) -30px -20px 35px -9px'}, ]); +test_interpolation({ + property: 'box-shadow', + from: '0px 0px 0px 0px black', + to: '1px 1px 1px 1px black', +}, [ + {at: -0.3, expect: 'rgb(0, 0, 0) -0.3px -0.3px 0px -0.3px'}, + {at: 0, expect: 'rgb(0, 0, 0) 0px 0px 0px 0px'}, + {at: 0.3, expect: 'rgb(0, 0, 0) 0.3px 0.3px 0.3px 0.3px'}, + {at: 0.6, expect: 'rgb(0, 0, 0) 0.6px 0.6px 0.6px 0.6px'}, + {at: 1, expect: 'rgb(0, 0, 0) 1px 1px 1px 1px'}, + {at: 1.5, expect: 'rgb(0, 0, 0) 1.5px 1.5px 1.5px 1.5px'}, +]); + // Test with color as first value. test_interpolation({ property: 'box-shadow', diff --git a/testing/web-platform/tests/css/css-transitions/animations/text-shadow-interpolation.html b/testing/web-platform/tests/css/css-transitions/animations/text-shadow-interpolation.html index c007816ecb042..d4a75654a9c84 100644 --- a/testing/web-platform/tests/css/css-transitions/animations/text-shadow-interpolation.html +++ b/testing/web-platform/tests/css/css-transitions/animations/text-shadow-interpolation.html @@ -106,5 +106,18 @@ {at: 1, expect: 'rgb(0, 128, 0) 10px 10px 10px'}, {at: 1.5, expect: 'rgb(0, 192, 0) 10px 10px 10px'}, ]); + +test_interpolation({ + property: 'text-shadow', + from: 'black 0px 0px 0px', + to: 'black 1px 1px 1px', +}, [ + {at: -0.3, expect: 'rgb(0, 0, 0) -0.3px -0.3px 0px'}, + {at: 0, expect: 'rgb(0, 0, 0) 0px 0px 0px'}, + {at: 0.3, expect: 'rgb(0, 0, 0) 0.3px 0.3px 0.3px'}, + {at: 0.6, expect: 'rgb(0, 0, 0) 0.6px 0.6px 0.6px'}, + {at: 1, expect: 'rgb(0, 0, 0) 1px 1px 1px'}, + {at: 1.5, expect: 'rgb(0, 0, 0) 1.5px 1.5px 1.5px'}, +]);