blob: 0752b7049928e955ded945ec13c0d36772dca5e5 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/ahem.js"></script>
<style>
:root {
font: 10px Ahem;
}
</style>
</head>
<body>
<template id="target-template">
<svg width="200px" height="300px" viewBox="0 0 1500 1000">
<marker class="target" />
</svg>
</template>
<script src="resources/interpolation-test.js"></script>
<script>
'use strict';
assertAttributeInterpolation({
property: 'markerHeight',
from: '1',
to: '6'
}, [
{at: -0.4, is: 0},
{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: 'markerHeight',
from: '10in',
to: '770pt'
}, [
{at: -0.4, is: '700pt'},
{at: 0, is: '720pt'},
{at: 0.2, is: '730pt'},
{at: 0.6, is: '750pt'},
{at: 1, is: '770pt'},
{at: 1.4, is: '790pt'}
]);
assertAttributeInterpolation({
property: 'markerHeight',
from: '55%',
to: '5em'
}, [
{at: -0.4, is: 750},
{at: 0, is: 550},
{at: 0.2, is: 450},
{at: 0.6, is: 250},
{at: 1, is: 50},
{at: 1.4, is: 0}
]);
assertAttributeInterpolation({
property: 'markerHeight',
from: '10',
to: '20ex'
}, [
{at: -0.4, is: '0'},
{at: 0, is: '10'},
{at: 1, is: '20ex'},
]);
</script>
</body>
</html>