1 description("Test for checking position of the svg element when multiple animateMotion are acting on it");
2 embedSVGTestCase("resources/animateMotion-multiple.svg");
4 // Setup animation test
6 shouldBeCloseEnough("rootSVGElement.getBBox().x", "20");
10 shouldBeCloseEnough("rootSVGElement.getBBox().x", "20");
14 shouldBeCloseEnough("rootSVGElement.getBBox().x", "40");
18 shouldBeCloseEnough("rootSVGElement.getBBox().x", "60");
22 shouldBeCloseEnough("rootSVGElement.getBBox().x", "20");
26 shouldBeCloseEnough("rootSVGElement.getBBox().x", "20");
29 function executeTest() {
30 var rects
= rootSVGElement
.ownerDocument
.getElementsByTagName("rect");
33 const expectedValues
= [
34 // [animationId, time, sampleCallback]
35 ["anim", 0.0, sample1
],
36 ["anim", 1.0, sample2
],
37 ["anim", 2.0, sample3
],
38 ["anim", 4.0, sample4
],
39 ["anim", 6.0, sample5
],
40 ["anim", 7.0, sample6
]
43 runAnimationTest(expectedValues
);
46 window
.animationStartsImmediately
= true;
47 var successfullyParsed
= true;