1 description("A copy of the corresponding W3C-SVG-1.1 test, which dumps the animation at certain times");
2 embedSVGTestCase("../W3C-SVG-1.1/animate-elem-11-t.svg");
4 // Setup animation test
6 shouldBeCloseEnough("rect1.height.animVal.value", "210");
7 shouldBe("rect1.height.baseVal.value", "210");
8 expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-250");
12 shouldBeCloseEnough("rect1.height.animVal.value", "143.4");
13 shouldBe("rect1.height.baseVal.value", "210");
14 expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-183.4");
18 shouldBeCloseEnough("rect1.height.animVal.value", "76.7");
19 shouldBe("rect1.height.baseVal.value", "210");
20 expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-116.7");
24 shouldBeCloseEnough("rect1.height.animVal.value", "10");
25 shouldBe("rect1.height.baseVal.value", "210");
26 expectTranslationMatrix("rootSVGElement.getTransformToElement(rect2)", "-250", "-50");
29 function executeTest() {
30 var rects
= rootSVGElement
.ownerDocument
.getElementsByTagName("rect");
34 const expectedValues
= [
35 // [animationId, time, sampleCallback]
36 ["an1", 0.0, sample1
],
37 ["an1", 2.999, sample2
],
38 ["an1", 3.001, sample2
],
39 ["an1", 5.999, sample3
],
40 ["an1", 6.001, sample3
],
41 ["an1", 8.999, sample4
],
42 ["an1", 9.001, sample4
],
43 ["an1", 60.0, sample4
]
46 runAnimationTest(expectedValues
);
49 window
.animationStartsImmediately
= true;
50 var successfullyParsed
= true;