blob: ec829cc1445bf34b65e37cb412ae7cf787b80007 [file] [log] [blame]
This test checks the SVGAnimatedEnumeration API - utilizing the clipPathUnits property of SVGClipPathElement
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Check initial clipPathUnits value
PASS clipPathElement.clipPathUnits.toString() is "[object SVGAnimatedEnumeration]"
PASS typeof(clipPathElement.clipPathUnits.baseVal) is "number"
PASS clipPathElement.clipPathUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE
Check that enumerations are static, caching value in a local variable and modifying it, should have no effect
PASS enumRef is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
PASS clipPathElement.clipPathUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE
Check assigning various valid and invalid values
PASS clipPathElement.clipPathUnits.baseVal = 3 threw exception Error: SVG_INVALID_VALUE_ERR: DOM SVG Exception 1.
PASS clipPathElement.clipPathUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE
PASS clipPathElement.clipPathUnits.baseVal = -1 threw exception Error: SVG_INVALID_VALUE_ERR: DOM SVG Exception 1.
PASS clipPathElement.clipPathUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE
PASS clipPathElement.clipPathUnits.baseVal = '1' is "1"
PASS clipPathElement.clipPathUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE
PASS clipPathElement.clipPathUnits.baseVal = 'aString' threw exception Error: SVG_INVALID_VALUE_ERR: DOM SVG Exception 1.
PASS clipPathElement.clipPathUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE
PASS clipPathElement.clipPathUnits.baseVal = 2 is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
PASS clipPathElement.clipPathUnits.baseVal = clipPathElement threw exception Error: SVG_INVALID_VALUE_ERR: DOM SVG Exception 1.
PASS clipPathElement.clipPathUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
PASS successfullyParsed is true
TEST COMPLETE