blob: 29a6f996ed985198cf345d0675717b2ff7a4cb60 [file] [log] [blame]
This test checks the use of SVGAnimatedEnumeration within 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
Switch to 'objectBoundingBox'
PASS clipPathElement.clipPathUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
PASS clipPathElement.clipPathUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
PASS clipPathElement.getAttribute('clipPathUnits') is "objectBoundingBox"
Try setting invalid values
PASS clipPathElement.clipPathUnits.baseVal = 3 threw exception TypeError: Failed to set the 'baseVal' property on 'SVGAnimatedEnumeration': The enumeration value provided (3) is larger than the largest allowed value (2)..
PASS clipPathElement.clipPathUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
PASS clipPathElement.getAttribute('clipPathUnits') is "objectBoundingBox"
PASS clipPathElement.clipPathUnits.baseVal = -1 threw exception TypeError: Failed to set the 'baseVal' property on 'SVGAnimatedEnumeration': The enumeration value provided (65535) is larger than the largest allowed value (2)..
PASS clipPathElement.clipPathUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
PASS clipPathElement.getAttribute('clipPathUnits') is "objectBoundingBox"
PASS clipPathElement.clipPathUnits.baseVal = 0 threw exception TypeError: Failed to set the 'baseVal' property on 'SVGAnimatedEnumeration': The enumeration value provided is 0, which is not settable..
PASS clipPathElement.clipPathUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
PASS clipPathElement.getAttribute('clipPathUnits') is "objectBoundingBox"
Switch to 'userSpaceOnUse'
PASS clipPathElement.clipPathUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE
PASS clipPathElement.clipPathUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE
PASS clipPathElement.getAttribute('clipPathUnits') is "userSpaceOnUse"
PASS successfullyParsed is true
TEST COMPLETE