1 description("This test forces use shadow tree recreation while an animating is running");
2 embedSVGTestCase("resources/force-use-shadow-tree-recreation-while-animating.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", "55");
12 shouldBe("rect.width.baseVal.value", "10");
15 function forceUseShadowTreeRecreation() {
16 rect
.setAttribute("fill", "green");
20 shouldBeCloseEnough("rect.width.animVal.value", "100");
21 shouldBe("rect.width.baseVal.value", "10");
24 function executeTest() {
25 rect
= rootSVGElement
.ownerDocument
.getElementsByTagName("rect")[0];
27 const expectedValues
= [
28 // [animationId, time, sampleCallback]
29 ["an1", 0.0, sample1
],
30 ["an1", 1.999, sample2
],
31 ["an1", 2.0, forceUseShadowTreeRecreation
],
32 ["an1", 2.001, sample2
],
33 ["an1", 4.0, sample3
],
34 ["an1", 60.0, sample3
],
37 runAnimationTest(expectedValues
);
40 window
.animationStartsImmediately
= true;
41 var successfullyParsed
= true;