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