| OLD | NEW |
| 1 description("Tests that 'transparent' is treated as a valid color."); | 1 description("Tests that 'transparent' is treated as a valid color."); |
| 2 createSVGTestCase(); | 2 createSVGTestCase(); |
| 3 | 3 |
| 4 // Setup test document | 4 // Setup test document |
| 5 var rect = createSVGElement("rect"); | 5 var rect = createSVGElement("rect"); |
| 6 rect.setAttribute("id", "test"); | 6 rect.setAttribute("id", "test"); |
| 7 rect.setAttribute("width", "100px"); | 7 rect.setAttribute("width", "100px"); |
| 8 rect.setAttribute("height", "100px"); | 8 rect.setAttribute("height", "100px"); |
| 9 rect.setAttribute("fill", "#00FF00"); | 9 rect.setAttribute("fill", "#00FF00"); |
| 10 rect.setAttribute("onclick", "executeTest()"); | 10 rect.setAttribute("onclick", "executeTest()"); |
| 11 | 11 |
| 12 var animate = createSVGElement("animateColor"); | 12 var animate = createSVGElement("animate"); |
| 13 animate.setAttribute("id", "animation"); | 13 animate.setAttribute("id", "animation"); |
| 14 animate.setAttribute("attributeName", "fill"); | 14 animate.setAttribute("attributeName", "fill"); |
| 15 animate.setAttribute("from", "transparent"); | 15 animate.setAttribute("from", "transparent"); |
| 16 animate.setAttribute("by", "red"); | 16 animate.setAttribute("by", "red"); |
| 17 animate.setAttribute("dur", "3s"); | 17 animate.setAttribute("dur", "3s"); |
| 18 animate.setAttribute("begin", "click"); | 18 animate.setAttribute("begin", "click"); |
| 19 rect.appendChild(animate); | 19 rect.appendChild(animate); |
| 20 rootSVGElement.appendChild(rect); | 20 rootSVGElement.appendChild(rect); |
| 21 | 21 |
| 22 // Setup animation test | 22 // Setup animation test |
| (...skipping 10 matching lines...) Expand all Loading... |
| 33 // [animationId, time, sampleCallback] | 33 // [animationId, time, sampleCallback] |
| 34 ["animation", 0.0, expectTransparent], | 34 ["animation", 0.0, expectTransparent], |
| 35 ["animation", 1.5, expectOtherColor] | 35 ["animation", 1.5, expectOtherColor] |
| 36 ]; | 36 ]; |
| 37 | 37 |
| 38 runAnimationTest(expectedValues); | 38 runAnimationTest(expectedValues); |
| 39 } | 39 } |
| 40 | 40 |
| 41 var successfullyParsed = true; | 41 var successfullyParsed = true; |
| 42 | 42 |
| OLD | NEW |