blob: 6a7c62f1c8ff8a79a92b2fbfca0673538acbee5a [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 SVG_INVALID_VALUE_ERR (DOM SVG Exception 1): An invalid value was passed to an operation or assigned to an attribute..
PASS clipPathElement.clipPathUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE
PASS clipPathElement.clipPathUnits.baseVal = -1 threw exception SVG_INVALID_VALUE_ERR (DOM SVG Exception 1): An invalid value was passed to an operation or assigned to an attribute..
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 SVG_INVALID_VALUE_ERR (DOM SVG Exception 1): An invalid value was passed to an operation or assigned to an attribute..
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 SVG_INVALID_VALUE_ERR (DOM SVG Exception 1): An invalid value was passed to an operation or assigned to an attribute..
PASS clipPathElement.clipPathUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
PASS successfullyParsed is true
TEST COMPLETE