blob: f286e8c688b905b6d4cf4bce5c3eee66ac7c2840 [file] [log] [blame]
<!DOCTYPE html>
<meta charset="UTF-8">
<style>
.target {
width: 100px;
height: 100px;
background-color: black;
display: inline-block;
border: 25px;
margin-right: 50px;
-webkit-mask-box-image-slice: 30%;
-webkit-mask-box-image-source: linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
}
.replica {
background-color: green;
}
</style>
<body>
<script src="resources/interpolation-test.js"></script>
<script>
assertInterpolation({
property: '-webkit-mask-box-image-outset',
from: '0px',
to: '50px',
}, [
{at: -0.3, is: '0px'}, // CSS -webkit-mask-box-image-outset can't be negative.
{at: 0, is: '0px'},
{at: 0.4, is: '20px'},
{at: 0.6, is: '30px'},
{at: 1, is: '50px'},
{at: 1.5, is: '75px'}
]);
assertInterpolation({
property: '-webkit-mask-box-image-outset',
from: '0',
to: '50',
}, [
{at: -0.3, is: '0'}, // CSS -webkit-mask-box-image-outset can't be negative.
{at: 0, is: '0'},
{at: 0.4, is: '20'},
{at: 0.6, is: '30'},
{at: 1, is: '50'},
{at: 1.5, is: '75'}
]);
</script>
</body>