Skip to content

Commit

Permalink
Bug 1731320 [wpt PR 30823] - Test that float values are correctly pro…
Browse files Browse the repository at this point in the history
…duced 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
  • Loading branch information
graouts authored and moz-wptsync-bot committed Oct 4, 2021
1 parent c918f8e commit 7b16122
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'},
]);
</script>
</body>

0 comments on commit 7b16122

Please sign in to comment.