| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="resources/SVGTestCase.js"></script> |
| <script src="../../resources/js-test-pre.js"></script> |
| <script src="../../fast/repaint/resources/repaint.js"></script> |
| </head> |
| <body onload="runRepaintTest()"> |
| <h1>SVG 1.1 dynamic update tests</h1> |
| <p id="description"></p> |
| <div id="console"></div> |
| <script> |
| // [Name] SVGFEDropShadowElement-svgdom-dy-prop.js |
| // [Expected rendering result] A green circle in the center of the image - and a series of PASS messages |
| |
| description("Tests dynamic updates of the 'dy' property of the SVGFEDropShadowElement object") |
| createSVGTestCase(); |
| |
| var dropShadowElement = createSVGElement("feDropShadow"); |
| dropShadowElement.setAttribute("dx", "10"); |
| dropShadowElement.setAttribute("dy", "0"); |
| |
| var filterElement = createSVGElement("filter"); |
| filterElement.setAttribute("id", "myFilter"); |
| filterElement.setAttribute("filterUnits", "userSpaceOnUse"); |
| filterElement.setAttribute("x", "0"); |
| filterElement.setAttribute("y", "0"); |
| filterElement.setAttribute("width", "200"); |
| filterElement.setAttribute("height", "200"); |
| filterElement.appendChild(dropShadowElement); |
| |
| var defsElement = createSVGElement("defs"); |
| defsElement.appendChild(filterElement); |
| |
| rootSVGElement.appendChild(defsElement); |
| |
| var circleElement = createSVGElement("circle"); |
| circleElement.setAttribute("cx", "100"); |
| circleElement.setAttribute("cy", "100"); |
| circleElement.setAttribute("r", "70"); |
| circleElement.setAttribute("fill", "green"); |
| circleElement.setAttribute("filter", "url(#myFilter)"); |
| rootSVGElement.appendChild(circleElement); |
| |
| shouldBe("dropShadowElement.dy.baseVal", "0"); |
| |
| function repaintTest() { |
| dropShadowElement.dy.baseVal = 10; |
| shouldBe("dropShadowElement.dy.baseVal", "10"); |
| |
| completeTest(); |
| } |
| |
| var successfullyParsed = true; |
| </script> |
| </body> |
| </html> |