1 description("This tests from-by-animations adding to previous underlying values");
2 embedSVGTestCase("resources/svglength-additive-from-by-1.svg");
4 // Setup animation test
6 shouldBeCloseEnough("rect.width.animVal.value", "10");
7 shouldBe("rect.width.baseVal.value", "10");
11 shouldBeCloseEnough("rect.width.animVal.value", "30");
12 shouldBe("rect.width.baseVal.value", "10");
16 shouldBeCloseEnough("rect.width.animVal.value", "50");
17 shouldBe("rect.width.baseVal.value", "10");
21 shouldBeCloseEnough("rect.width.animVal.value", "75");
22 shouldBe("rect.width.baseVal.value", "10");
26 shouldBeCloseEnough("rect.width.animVal.value", "100");
27 shouldBe("rect.width.baseVal.value", "10");
30 function executeTest() {
31 rect
= rootSVGElement
.ownerDocument
.getElementsByTagName("rect")[0];
33 const expectedValues
= [
34 // [animationId, time, sampleCallback]
35 ["an1", 0.0, sample1
],
36 ["an1", 2.0, sample2
],
37 ["an1", 4.0, sample3
],
38 ["an1", 7.0, sample4
],
39 ["an1", 9.0, sample5
],
40 ["an1", 60.0, sample5
]
43 runAnimationTest(expectedValues
);
46 window
.animationStartsImmediately
= true;
47 var successfullyParsed
= true;