OLD | NEW |
| (Empty) |
1 // [Name] SVGPathElement-dom-requiredFeatures.js | |
2 // [Expected rendering result] a series of PASS messages | |
3 | |
4 createSVGTestCase(); | |
5 | |
6 var pathElement = createSVGElement("path"); | |
7 pathElement.setAttribute("d", "M0 0 L 200 0 L 200 200 L 0 200"); | |
8 | |
9 rootSVGElement.appendChild(pathElement); | |
10 | |
11 function repaintTest() { | |
12 debug("Check that SVGPathElement is initially displayed"); | |
13 shouldHaveBBox("pathElement", "200", "200"); | |
14 debug("Check that setting requiredFeatures to something invalid makes it not
render"); | |
15 pathElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11/fea
ture#BogusFeature"); | |
16 shouldHaveBBox("pathElement", "0", "0"); | |
17 debug("Check that setting requiredFeatures to something valid makes it rende
r again"); | |
18 pathElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11/fea
ture#Shape"); | |
19 shouldHaveBBox("pathElement", "200", "200"); | |
20 debug("Check that adding something valid to requiredFeatures keeps rendering
the element"); | |
21 pathElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11/fea
ture#Gradient"); | |
22 shouldHaveBBox("pathElement", "200", "200"); | |
23 debug("Check that adding something invalid to requiredFeatures makes it not
render"); | |
24 pathElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11/fea
ture#BogusFeature"); | |
25 shouldHaveBBox("pathElement", "0", "0"); | |
26 } | |
27 | |
28 var successfullyParsed = true; | |
OLD | NEW |