OLD | NEW |
1 // [Name] SVGGElement-svgdom-requiredFeatures.js | 1 // [Name] SVGGElement-svgdom-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 gElement = createSVGElement("g"); | 6 var gElement = createSVGElement("g"); |
7 | 7 |
8 rootSVGElement.appendChild(gElement); | 8 rootSVGElement.appendChild(gElement); |
9 | 9 |
10 function repaintTest() { | 10 function repaintTest() { |
11 debug("Check that SVGGElement is initially displayed"); | 11 debug("Check that SVGGElement is initially displayed"); |
12 shouldBeEqualToString("document.defaultView.getComputedStyle(gElement, null)
.display", "inline"); | 12 shouldBeEqualToString("document.defaultView.getComputedStyle(gElement, null)
.display", "inline"); |
13 debug("Check that setting requiredFeatures to something invalid makes it not
render"); | 13 debug("Check that setting requiredFeatures to something invalid makes it not
render"); |
14 gElement.requiredFeatures.appendItem("foo"); | 14 gElement.requiredFeatures.appendItem("http://www.w3.org/TR/SVG11/feature#Bog
usFeature"); |
15 shouldBeEqualToString("document.defaultView.getComputedStyle(gElement, null)
.display", ""); | 15 shouldBeEqualToString("document.defaultView.getComputedStyle(gElement, null)
.display", ""); |
16 debug("Check that setting requiredFeatures to something valid makes it rende
r again"); | 16 debug("Check that setting requiredFeatures to something valid makes it rende
r again"); |
17 gElement.requiredFeatures.replaceItem("http://www.w3.org/TR/SVG11/feature#Sh
ape", 0); | 17 gElement.requiredFeatures.replaceItem("http://www.w3.org/TR/SVG11/feature#Sh
ape", 0); |
18 shouldBeEqualToString("document.defaultView.getComputedStyle(gElement, null)
.display", "inline"); | 18 shouldBeEqualToString("document.defaultView.getComputedStyle(gElement, null)
.display", "inline"); |
19 debug("Check that adding something valid to requiredFeatures keeps rendering
the element"); | 19 debug("Check that adding something valid to requiredFeatures keeps rendering
the element"); |
20 gElement.requiredFeatures.appendItem("http://www.w3.org/TR/SVG11/feature#Gra
dient"); | 20 gElement.requiredFeatures.appendItem("http://www.w3.org/TR/SVG11/feature#Gra
dient"); |
21 shouldBeEqualToString("document.defaultView.getComputedStyle(gElement, null)
.display", "inline"); | 21 shouldBeEqualToString("document.defaultView.getComputedStyle(gElement, null)
.display", "inline"); |
22 debug("Check that adding something invalid to requiredFeatures makes it not
render"); | 22 debug("Check that adding something invalid to requiredFeatures makes it not
render"); |
23 gElement.requiredFeatures.appendItem("foo"); | 23 gElement.requiredFeatures.appendItem("http://www.w3.org/TR/SVG11/feature#Bog
usFeature"); |
24 shouldBeEqualToString("document.defaultView.getComputedStyle(gElement, null)
.display", ""); | 24 shouldBeEqualToString("document.defaultView.getComputedStyle(gElement, null)
.display", ""); |
25 | 25 |
26 completeTest(); | 26 completeTest(); |
27 } | 27 } |
28 | 28 |
29 var successfullyParsed = true; | 29 var successfullyParsed = true; |
OLD | NEW |