1 description("This tests by-animations adding to previous underlying values");
2 embedSVGTestCase("resources/svglength-additive-by-6.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", "10");
22 shouldBe("rect.width.baseVal.value", "10");
26 shouldBeCloseEnough("rect.width.animVal.value", "55");
27 shouldBe("rect.width.baseVal.value", "10");
31 shouldBeCloseEnough("rect.width.animVal.value", "100");
32 shouldBe("rect.width.baseVal.value", "10");
35 function executeTest() {
36 rect
= rootSVGElement
.ownerDocument
.getElementsByTagName("rect")[0];
38 const expectedValues
= [
39 // [animationId, time, sampleCallback]
40 ["an1", 0.0, sample1
],
41 ["an1", 2.0, sample2
],
42 ["an1", 3.999, sample3
],
43 ["an1", 4.001, sample4
],
44 ["an1", 7.0, sample5
],
45 ["an1", 9.0, sample6
],
46 ["an1", 60.0, sample6
]
49 runAnimationTest(expectedValues
);
52 window
.animationStartsImmediately
= true;
53 var successfullyParsed
= true;