Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / animations / script-tests / change-css-property-while-animating-fill-remove.js
blobc226aa8d5154ac660cd074108e4611b6db163ce9
1 description("This tests scripting a CSS property while animation is running");
2 embedSVGTestCase("resources/change-css-property-while-animating-fill-remove.svg");
4 // Setup animation test
5 function sample1() {
6 shouldBeCloseEnough("parseFloat(getComputedStyle(rect).opacity)", "0");
9 function sample2() {
10 shouldBeCloseEnough("parseFloat(getComputedStyle(rect).opacity)", "0.25");
11 rect.setAttribute("opacity", "1");
14 function sample3() {
15 shouldBeCloseEnough("parseFloat(getComputedStyle(rect).opacity)", "0.25");
18 function sample4() {
19 shouldBeCloseEnough("parseFloat(getComputedStyle(rect).opacity)", "0.5");
22 function sample5() {
23 shouldBeCloseEnough("parseFloat(getComputedStyle(rect).opacity)", "1");
26 function executeTest() {
27 rect = rootSVGElement.ownerDocument.getElementsByTagName("rect")[0];
29 const expectedValues = [
30 // [animationId, time, sampleCallback]
31 ["an1", 0.0, sample1],
32 ["an1", 2.0, sample2],
33 ["an1", 2.001, sample3],
34 ["an1", 3.999, sample4],
35 ["an1", 4.001, sample5],
36 ["an1", 60.0, sample5]
39 runAnimationTest(expectedValues);
42 window.animationStartsImmediately = true;
43 var successfullyParsed = true;