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