| description("This tests scripting a CSS property while animation is running"); |
| embedSVGTestCase("resources/change-css-property-while-animating-fill-remove.svg"); |
| shouldBeCloseEnough("getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); |
| shouldBeCloseEnough("getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0.25"); |
| rect.setAttribute("opacity", "1"); |
| shouldBeCloseEnough("getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0.25"); |
| shouldBeCloseEnough("getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0.5"); |
| shouldBeCloseEnough("getComputedStyle(rect).getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "1"); |
| rect = rootSVGElement.ownerDocument.getElementsByTagName("rect")[0]; |
| // [animationId, time, sampleCallback] |
| runAnimationTest(expectedValues); |
| window.animationStartsImmediately = true; |
| var successfullyParsed = true; |