blob: f381e53ec95c68a6c041b837c275110fecec9358 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script src="../dynamic-updates/resources/SVGTestCase.js"></script>
<script src="resources/SVGAnimationTestCase.js"></script>
</head>
<body onload="runSMILTest()">
<h1>SVG 1.1 dynamic animation tests</h1>
<p id="description"></p>
<div id="console"></div>
<script>
description("A copy of the corresponding W3C-SVG-1.1 test, which dumps the animation at certain times");
embedSVGTestCase("../W3C-SVG-1.1/animate-elem-07-t.svg");
// Setup animation test
function sample1() {
expectTranslationMatrix("rootSVGElement.getTransformToElement(path)", "-15", "-43");
}
function sample2() {
expectTranslationMatrix("rootSVGElement.getTransformToElement(path)", "-38.5", "-30");
}
function sample3() {
expectTranslationMatrix("rootSVGElement.getTransformToElement(path)", "-65", "-33");
}
function executeTest() {
path = rootSVGElement.ownerDocument.getElementsByTagName("path")[1];
const expectedValues = [
// [animationId, time, sampleCallback]
["an1", 0.0, sample1],
["an1", 3.0, sample2],
["an1", 6.0, sample3],
["an1", 60.0, sample3]
];
runAnimationTest(expectedValues);
}
window.animationStartsImmediately = true;
var successfullyParsed = true;
</script>
</body>
</html>