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