OLD | NEW |
1 // [Name] SVGFEMorphologyElement-svgdom-radius-call.js | 1 // [Name] SVGFEMorphologyElement-svgdom-radius-call.js |
2 // [Expected rendering result] A text message with feMorphology filter - and a s
eries of PASS messages | 2 // [Expected rendering result] A text message with feMorphology filter - and a s
eries of PASS messages |
3 | 3 |
4 description("Tests dynamic updates of the 'radius' property of the SVGFEMorpholo
gyElement object") | 4 description("Tests dynamic updates of the 'radius' property of the SVGFEMorpholo
gyElement object") |
5 createSVGTestCase(); | 5 createSVGTestCase(); |
6 | 6 |
7 var morphologyElement = createSVGElement("feMorphology"); | 7 var morphologyElement = createSVGElement("feMorphology"); |
8 morphologyElement.setAttribute("in", "SourceGraphic"); | 8 morphologyElement.setAttribute("in", "SourceGraphic"); |
9 morphologyElement.setAttribute("operator", "erode"); | 9 morphologyElement.setAttribute("operator", "erode"); |
10 morphologyElement.setAttribute("radius", "6"); | 10 morphologyElement.setAttribute("radius", "6"); |
(...skipping 23 matching lines...) Expand all Loading... |
34 textElement.setAttribute("x", 20); | 34 textElement.setAttribute("x", 20); |
35 textElement.setAttribute("y", 90); | 35 textElement.setAttribute("y", 90); |
36 textElement.textContent = "Erode radius = 4"; | 36 textElement.textContent = "Erode radius = 4"; |
37 textElement.setAttribute("filter", "url(#myFilter)"); | 37 textElement.setAttribute("filter", "url(#myFilter)"); |
38 rootSVGElement.appendChild(textElement); | 38 rootSVGElement.appendChild(textElement); |
39 | 39 |
40 shouldBe("morphologyElement.radiusX.baseVal", "6"); | 40 shouldBe("morphologyElement.radiusX.baseVal", "6"); |
41 shouldBe("morphologyElement.radiusY.baseVal", "6"); | 41 shouldBe("morphologyElement.radiusY.baseVal", "6"); |
42 | 42 |
43 function repaintTest() { | 43 function repaintTest() { |
44 morphologyElement.setRadius(4, 4); | 44 morphologyElement.setAttribute("radius", "4,4"); |
45 shouldBe("morphologyElement.radiusX.baseVal", "4"); | 45 shouldBe("morphologyElement.radiusX.baseVal", "4"); |
46 shouldBe("morphologyElement.radiusY.baseVal", "4"); | 46 shouldBe("morphologyElement.radiusY.baseVal", "4"); |
47 } | 47 } |
48 | 48 |
49 var successfullyParsed = true; | 49 var successfullyParsed = true; |
OLD | NEW |