Index: LayoutTests/svg/dynamic-updates/script-tests/SVGGElement-dom-requiredFeatures.js |
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGGElement-dom-requiredFeatures.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGGElement-dom-requiredFeatures.js |
index 2b5de873339d57feed5dbcd67eceee671f30fbe0..87a8cd8448e768e5aa140e1139caa08421b7e116 100644 |
--- a/LayoutTests/svg/dynamic-updates/script-tests/SVGGElement-dom-requiredFeatures.js |
+++ b/LayoutTests/svg/dynamic-updates/script-tests/SVGGElement-dom-requiredFeatures.js |
@@ -4,24 +4,28 @@ |
createSVGTestCase(); |
var gElement = createSVGElement("g"); |
+var imageElement = createSVGElement("image"); |
+imageElement.setAttribute("width", "200"); |
+imageElement.setAttribute("height", "200"); |
+gElement.appendChild(imageElement); |
rootSVGElement.appendChild(gElement); |
function repaintTest() { |
debug("Check that SVGGElement is initially displayed"); |
- shouldBeEqualToString("document.defaultView.getComputedStyle(gElement, null).display", "inline"); |
+ shouldHaveBBox("gElement.firstElementChild", "200", "200"); |
debug("Check that setting requiredFeatures to something invalid makes it not render"); |
gElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11/feature#BogusFeature"); |
- shouldBeEqualToString("document.defaultView.getComputedStyle(gElement, null).display", ""); |
+ shouldHaveBBox("gElement.firstElementChild", "0", "0"); |
debug("Check that setting requiredFeatures to something valid makes it render again"); |
gElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11/feature#Shape"); |
- shouldBeEqualToString("document.defaultView.getComputedStyle(gElement, null).display", "inline"); |
+ shouldHaveBBox("gElement.firstElementChild", "200", "200"); |
debug("Check that adding something valid to requiredFeatures keeps rendering the element"); |
gElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11/feature#Gradient"); |
- shouldBeEqualToString("document.defaultView.getComputedStyle(gElement, null).display", "inline"); |
+ shouldHaveBBox("gElement.firstElementChild", "200", "200"); |
debug("Check that adding something invalid to requiredFeatures makes it not render"); |
gElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11/feature#BogusFeature"); |
- shouldBeEqualToString("document.defaultView.getComputedStyle(gElement, null).display", ""); |
+ shouldHaveBBox("gElement.firstElementChild", "0", "0"); |
completeTest(); |
} |