OLD | NEW |
1 // [Name] SVGSVGElement-dom-requiredFeatures.js | 1 // [Name] SVGSVGElement-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 svgElement = rootSVGElement; | 6 var svgElement = rootSVGElement; |
7 | 7 |
8 function repaintTest() { | 8 function repaintTest() { |
9 debug("Check that SVGSVGElement is initially displayed"); | 9 debug("Check that SVGSVGElement is initially displayed"); |
10 shouldBeEqualToString("document.defaultView.getComputedStyle(svgElement, nul
l).display", "inline"); | 10 shouldBeEqualToString("document.defaultView.getComputedStyle(svgElement, nul
l).display", "inline"); |
11 debug("Check that setting requiredFeatures to something invalid makes it not
render"); | 11 debug("Check that setting requiredFeatures to something invalid makes it not
render"); |
12 svgElement.setAttribute("requiredFeatures", "foo"); | 12 svgElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11/feat
ure#BogusFeature"); |
13 shouldBeEqualToString("document.defaultView.getComputedStyle(svgElement, nul
l).display", ""); | 13 shouldBeEqualToString("document.defaultView.getComputedStyle(svgElement, nul
l).display", ""); |
14 debug("Check that setting requiredFeatures to something valid makes it rende
r again"); | 14 debug("Check that setting requiredFeatures to something valid makes it rende
r again"); |
15 svgElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11/feat
ure#Shape"); | 15 svgElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11/feat
ure#Shape"); |
16 shouldBeEqualToString("document.defaultView.getComputedStyle(svgElement, nul
l).display", "inline"); | 16 shouldBeEqualToString("document.defaultView.getComputedStyle(svgElement, nul
l).display", "inline"); |
17 debug("Check that adding something valid to requiredFeatures keeps rendering
the element"); | 17 debug("Check that adding something valid to requiredFeatures keeps rendering
the element"); |
18 svgElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11/feat
ure#Gradient"); | 18 svgElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11/feat
ure#Gradient"); |
19 shouldBeEqualToString("document.defaultView.getComputedStyle(svgElement, nul
l).display", "inline"); | 19 shouldBeEqualToString("document.defaultView.getComputedStyle(svgElement, nul
l).display", "inline"); |
20 debug("Check that adding something invalid to requiredFeatures makes it not
render"); | 20 debug("Check that adding something invalid to requiredFeatures makes it not
render"); |
21 svgElement.setAttribute("requiredFeatures", "foo"); | 21 svgElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11/feat
ure#BogusFeature"); |
22 shouldBeEqualToString("document.defaultView.getComputedStyle(svgElement, nul
l).display", ""); | 22 shouldBeEqualToString("document.defaultView.getComputedStyle(svgElement, nul
l).display", ""); |
23 | 23 |
24 completeTest(); | 24 completeTest(); |
25 } | 25 } |
26 | 26 |
27 | 27 |
28 var successfullyParsed = true; | 28 var successfullyParsed = true; |
OLD | NEW |