Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / animations / script-tests / change-baseVal-while-animating-fill-remove-2.js
blob4a814b70d5de0615163a944f5096bb1f9e962ea1
1 description("This tests scripting baseVal while animation is running");
2 embedSVGTestCase("resources/change-baseVal-while-animating-fill-remove.svg");
4 // Setup animation test
5 function sample1() {
6 shouldBeCloseEnough("rect.width.animVal.value", "10");
7 shouldBe("rect.width.baseVal.value", "10");
10 function sample2() {
11 shouldBeCloseEnough("rect.width.animVal.value", "30");
12 shouldBe("rect.width.baseVal.value", "10");
14 rect.setAttribute("width", "100");
17 function sample3() {
18 shouldBeCloseEnough("rect.width.animVal.value", "30");
19 shouldBe("rect.width.baseVal.value", "100");
22 function sample4() {
23 shouldBeCloseEnough("rect.width.animVal.value", "50");
24 shouldBe("rect.width.baseVal.value", "100");
27 function sample5() {
28 shouldBe("rect.width.animVal.value", "100");
29 shouldBe("rect.width.baseVal.value", "100");
32 function executeTest() {
33 rect = rootSVGElement.ownerDocument.getElementsByTagName("rect")[0];
35 // 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.
36 const expectedValues = [
37 // [animationId, time, sampleCallback]
38 ["an1", 0.0, sample1],
39 ["an1", 2.0, sample2],
40 ["an1", 2.001, sample3],
41 ["an1", 3.999, sample4],
42 ["an1", 4.001, sample5],
43 ["an1", 60.0, sample5]
46 runAnimationTest(expectedValues);
49 window.animationStartsImmediately = true;
50 var successfullyParsed = true;