blob: 832b810121d03cb63a296d65b400c59b8514235e [file] [log] [blame]
<!DOCTYPE html>
<meta charset="UTF-8">
<style>
.target {
width: 10px;
height: 10px;
background-color: black;
}
.expected {
background-color: green;
}
</style>
<body>
<script src="resources/interpolation-test.js"></script>
<script>
assertInterpolation({
property: 'border',
from: '10px solid #000',
to: '20px dashed #000',
method: 'CSS Transitions',
}, [
{at: -0.3, is: '7px dashed #000'},
{at: 0, is: '10px dashed #000'},
{at: 0.3, is: '13px dashed #000'},
{at: 0.6, is: '16px dashed #000'},
{at: 1, is: '20px dashed #000'},
{at: 1.5, is: '25px dashed #000'},
]);
assertInterpolation({
property: 'border',
from: '10px solid #000',
to: '20px dashed #000',
method: 'CSS Animations',
}, [
{at: -0.3, is: '7px solid #000'},
{at: 0, is: '10px solid #000'},
{at: 0.3, is: '13px solid #000'},
{at: 0.6, is: '16px dashed #000'},
{at: 1, is: '20px dashed #000'},
{at: 1.5, is: '25px dashed #000'},
]);
assertInterpolation({
property: 'border',
from: '10px solid #000',
to: '20px dashed #000',
method: 'Web Animations',
}, [
{at: -0.3, is: '7px solid #000'},
{at: 0, is: '10px solid #000'},
{at: 0.3, is: '13px solid #000'},
{at: 0.6, is: '16px dashed #000'},
{at: 1, is: '20px dashed #000'},
{at: 1.5, is: '25px dashed #000'},
]);
</script>
</body>