blob: 3af895183f563fd73a361b5d0002195a11166cac [file] [log] [blame]
This test checks the SVGPreserveAspectRatio API - utilizing the preserveAspectRatio property of SVGSVGElement
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Check initial align/meetOrSlice values
PASS preserveAspectRatio.align is SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMID
PASS preserveAspectRatio.meetOrSlice is SVGPreserveAspectRatio.SVG_MEETORSLICE_MEET
Check assigning align/meetOrSlice values
PASS preserveAspectRatio.align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMIN is SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMIN
PASS preserveAspectRatio.meetOrSlice = SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE is SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE
Check assigning invalid align values
PASS preserveAspectRatio.align = preserveAspectRatio threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS preserveAspectRatio.align = null threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS preserveAspectRatio.align = 'aString' threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS preserveAspectRatio.align = svgElement threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS preserveAspectRatio.align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_UNKNOWN threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS preserveAspectRatio.align = -1 threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS preserveAspectRatio.align = 11 threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
Check assigning invalid meetOrSlice values
PASS preserveAspectRatio.meetOrSlice = preserveAspectRatio threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS preserveAspectRatio.meetOrSlice = null threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS preserveAspectRatio.meetOrSlice = 'aString' threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS preserveAspectRatio.meetOrSlice = svgElement threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS preserveAspectRatio.meetOrSlice = SVGPreserveAspectRatio.SVG_MEETORSLICE_UNKNOWN threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS preserveAspectRatio.meetOrSlice = -1 threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
PASS preserveAspectRatio.meetOrSlice = 3 threw exception NotSupportedError: The implementation did not support the requested type of object or operation..
Check that the preserveAspectRatio remained correct
PASS preserveAspectRatio.align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMIN is SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMIDYMIN
PASS preserveAspectRatio.meetOrSlice = SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE is SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE
PASS successfullyParsed is true
TEST COMPLETE