blob: 90c754583214ca1f66740ae081bc26eaea22d776 [file] [log] [blame]
This test checks the use of SVGAnimatedEnumeration within SVGMaskElement
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Check initial 'maskUnits' value
PASS maskElement.maskUnits.toString() is "[object SVGAnimatedEnumeration]"
PASS typeof(maskElement.maskUnits.baseVal) is "number"
PASS maskElement.maskUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE
Switch to 'objectBoundingBox'
PASS maskElement.maskUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
PASS maskElement.maskUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
PASS maskElement.getAttribute('maskUnits') is "objectBoundingBox"
Try setting invalid values
PASS maskElement.maskUnits.baseVal = 3 threw exception TypeError: Type error.
PASS maskElement.maskUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
PASS maskElement.getAttribute('maskUnits') is "objectBoundingBox"
PASS maskElement.maskUnits.baseVal = -1 threw exception TypeError: Type error.
PASS maskElement.maskUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
PASS maskElement.getAttribute('maskUnits') is "objectBoundingBox"
PASS maskElement.maskUnits.baseVal = 0 threw exception TypeError: Type error.
PASS maskElement.maskUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
PASS maskElement.getAttribute('maskUnits') is "objectBoundingBox"
Switch to 'userSpaceOnUse'
PASS maskElement.maskUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE
PASS maskElement.maskUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE
PASS maskElement.getAttribute('maskUnits') is "userSpaceOnUse"
Check initial 'maskContentUnits' value
PASS maskElement.maskContentUnits.toString() is "[object SVGAnimatedEnumeration]"
PASS typeof(maskElement.maskContentUnits.baseVal) is "number"
PASS maskElement.maskContentUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE
Switch to 'objectBoundingBox'
PASS maskElement.maskContentUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
PASS maskElement.maskContentUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
PASS maskElement.getAttribute('maskContentUnits') is "objectBoundingBox"
Try setting invalid values
PASS maskElement.maskContentUnits.baseVal = 3 threw exception TypeError: Type error.
PASS maskElement.maskContentUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
PASS maskElement.getAttribute('maskContentUnits') is "objectBoundingBox"
PASS maskElement.maskContentUnits.baseVal = -1 threw exception TypeError: Type error.
PASS maskElement.maskContentUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
PASS maskElement.getAttribute('maskContentUnits') is "objectBoundingBox"
PASS maskElement.maskContentUnits.baseVal = 0 threw exception TypeError: Type error.
PASS maskElement.maskContentUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX
PASS maskElement.getAttribute('maskContentUnits') is "objectBoundingBox"
Switch to 'userSpaceOnUse'
PASS maskElement.maskContentUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE
PASS maskElement.maskContentUnits.baseVal is SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE
PASS maskElement.getAttribute('maskContentUnits') is "userSpaceOnUse"
PASS successfullyParsed is true
TEST COMPLETE