Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / animations / script-tests / additive-from-to-width-animation.js
blob510a8640a682cd8ff18344de787395ad2647a0c5
1 description("This tests multiple additive='sum' animations running at the same time");
2 embedSVGTestCase("resources/additive-from-to-width-animation.svg");
4 // Setup animation test
5 function sample1() {
6 shouldBeCloseEnough("rect.width.animVal.value", "20");
7 shouldBe("rect.width.baseVal.value", "10");
10 function sample2() {
11 shouldBeCloseEnough("rect.width.animVal.value", "60");
12 shouldBe("rect.width.baseVal.value", "10");
15 function sample3() {
16 shouldBeCloseEnough("rect.width.animVal.value", "100");
17 shouldBe("rect.width.baseVal.value", "10");
20 function executeTest() {
21 rect = rootSVGElement.ownerDocument.getElementsByTagName("rect")[0];
23 // All animations in the test file use the same duration, so it's not needed to list all sample points individually for an5/an6/an7/an8.
24 const expectedValues = [
25 // [animationId, time, sampleCallback]
26 ["an1", 0.0, sample1],
27 ["an1", 2.0, sample2],
28 ["an1", 4.0, sample3],
29 ["an1", 60.0, sample3]
32 runAnimationTest(expectedValues);
35 window.animationStartsImmediately = true;
36 var successfullyParsed = true;