This test checks the SVGAnimatedRect API - utilizing the viewBox property of SVGSVGElement

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".



Check initial viewBox value
PASS svgElement.viewBox.toString() is "[object SVGAnimatedRect]"
PASS svgElement.viewBox.baseVal.toString() is "[object SVGRect]"
PASS svgElement.viewBox.baseVal.x is 0

Check that rects are dynamic, caching value in a local variable and modifying it, should take effect
PASS numRef.x is 100
PASS svgElement.viewBox.baseVal.x is 100

Check that assigning to baseVal has no effect, as no setter is defined
PASS svgElement.viewBox.baseVal = -1 is -1
PASS svgElement.viewBox.baseVal = 'aString' is "aString"
PASS svgElement.viewBox.baseVal = svgElement is svgElement

Check that the viewBox x remained 100, and the baseVal type has not been changed
PASS svgElement.viewBox.baseVal.toString() is "[object SVGRect]"
PASS svgElement.viewBox.baseVal.x is 100
PASS successfullyParsed is true

TEST COMPLETE

