| OLD | NEW |
| 1 // [Name] SVGPolylineElement-dom-requiredFeatures.js | 1 // [Name] SVGPolylineElement-dom-requiredFeatures.js |
| 2 // [Expected rendering result] a series of PASS messages | 2 // [Expected rendering result] a series of PASS messages |
| 3 | 3 |
| 4 createSVGTestCase(); | 4 createSVGTestCase(); |
| 5 | 5 |
| 6 var polylineElement = createSVGElement("polyline"); | 6 var polylineElement = createSVGElement("polyline"); |
| 7 polylineElement.setAttribute("points", "0,0 200,0 200,200 0, 200"); | 7 polylineElement.setAttribute("points", "0,0 200,0 200,200 0, 200"); |
| 8 | 8 |
| 9 rootSVGElement.appendChild(polylineElement); | 9 rootSVGElement.appendChild(polylineElement); |
| 10 | 10 |
| 11 function repaintTest() { | 11 function repaintTest() { |
| 12 debug("Check that SVGPolylineElement is initially displayed"); | 12 debug("Check that SVGPolylineElement is initially displayed"); |
| 13 shouldBeEqualToString("document.defaultView.getComputedStyle(polylineElement
, null).display", "inline"); | 13 shouldBeEqualToString("document.defaultView.getComputedStyle(polylineElement
, null).display", "inline"); |
| 14 debug("Check that setting requiredFeatures to something invalid makes it not
render"); | 14 debug("Check that setting requiredFeatures to something invalid makes it not
render"); |
| 15 polylineElement.setAttribute("requiredFeatures", "foo"); | 15 polylineElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11
/feature#BogusFeature"); |
| 16 shouldBeEqualToString("document.defaultView.getComputedStyle(polylineElement
, null).display", ""); | 16 shouldBeEqualToString("document.defaultView.getComputedStyle(polylineElement
, null).display", ""); |
| 17 debug("Check that setting requiredFeatures to something valid makes it rende
r again"); | 17 debug("Check that setting requiredFeatures to something valid makes it rende
r again"); |
| 18 polylineElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11
/feature#Shape"); | 18 polylineElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11
/feature#Shape"); |
| 19 shouldBeEqualToString("document.defaultView.getComputedStyle(polylineElement
, null).display", "inline"); | 19 shouldBeEqualToString("document.defaultView.getComputedStyle(polylineElement
, null).display", "inline"); |
| 20 debug("Check that adding something valid to requiredFeatures keeps rendering
the element"); | 20 debug("Check that adding something valid to requiredFeatures keeps rendering
the element"); |
| 21 polylineElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11
/feature#Gradient"); | 21 polylineElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11
/feature#Gradient"); |
| 22 shouldBeEqualToString("document.defaultView.getComputedStyle(polylineElement
, null).display", "inline"); | 22 shouldBeEqualToString("document.defaultView.getComputedStyle(polylineElement
, null).display", "inline"); |
| 23 debug("Check that adding something invalid to requiredFeatures makes it not
render"); | 23 debug("Check that adding something invalid to requiredFeatures makes it not
render"); |
| 24 polylineElement.setAttribute("requiredFeatures", "foo"); | 24 polylineElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11
/feature#BogusFeature"); |
| 25 shouldBeEqualToString("document.defaultView.getComputedStyle(polylineElement
, null).display", ""); | 25 shouldBeEqualToString("document.defaultView.getComputedStyle(polylineElement
, null).display", ""); |
| 26 | 26 |
| 27 completeTest(); | 27 completeTest(); |
| 28 } | 28 } |
| 29 | 29 |
| 30 var successfullyParsed = true; | 30 var successfullyParsed = true; |
| OLD | NEW |