blob: 557f68e534dcb08aba398d344caf09648c8c5c1b [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<template id="target-template">
<svg width="0" height="0">
<rect class="target"/>
</svg>
</template>
<script src="../svg-attribute-interpolation/resources/interpolation-test.js"></script>
<script>
'use strict';
assertAttributeInterpolation({
property: 'y',
underlying: '2',
from: '-1',
fromComposite: 'add',
to: '4',
toComposite: 'add'
}, [
{at: -0.4, is: -1},
{at: 0, is: 1},
{at: 0.2, is: 2},
{at: 0.6, is: 4},
{at: 1, is: 6},
{at: 1.4, is: 8}
]);
assertAttributeInterpolation({
property: 'y',
underlying: '2',
from: '1',
fromComposite: 'replace',
to: '4',
toComposite: 'add'
}, [
{at: -0.4, is: -1},
{at: 0, is: 1},
{at: 0.2, is: 2},
{at: 0.6, is: 4},
{at: 1, is: 6},
{at: 1.4, is: 8}
]);
assertAttributeInterpolation({
property: 'y',
underlying: '1',
from: neutralKeyframe,
to: '6',
toComposite: 'replace'
}, [
{at: -0.4, is: -1},
{at: 0, is: 1},
{at: 0.2, is: 2},
{at: 0.6, is: 4},
{at: 1, is: 6},
{at: 1.4, is: 8}
]);
</script>
</body>
</html>