| 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 Error: NotSupportedError: DOM Exception 9. |
| PASS preserveAspectRatio.align = null threw exception Error: NotSupportedError: DOM Exception 9. |
| PASS preserveAspectRatio.align = 'aString' threw exception Error: NotSupportedError: DOM Exception 9. |
| PASS preserveAspectRatio.align = svgElement threw exception Error: NotSupportedError: DOM Exception 9. |
| PASS preserveAspectRatio.align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_UNKNOWN threw exception Error: NotSupportedError: DOM Exception 9. |
| PASS preserveAspectRatio.align = -1 threw exception Error: NotSupportedError: DOM Exception 9. |
| PASS preserveAspectRatio.align = 11 threw exception Error: NotSupportedError: DOM Exception 9. |
| |
| Check assigning invalid meetOrSlice values |
| PASS preserveAspectRatio.meetOrSlice = preserveAspectRatio threw exception Error: NotSupportedError: DOM Exception 9. |
| PASS preserveAspectRatio.meetOrSlice = null threw exception Error: NotSupportedError: DOM Exception 9. |
| PASS preserveAspectRatio.meetOrSlice = 'aString' threw exception Error: NotSupportedError: DOM Exception 9. |
| PASS preserveAspectRatio.meetOrSlice = svgElement threw exception Error: NotSupportedError: DOM Exception 9. |
| PASS preserveAspectRatio.meetOrSlice = SVGPreserveAspectRatio.SVG_MEETORSLICE_UNKNOWN threw exception Error: NotSupportedError: DOM Exception 9. |
| PASS preserveAspectRatio.meetOrSlice = -1 threw exception Error: NotSupportedError: DOM Exception 9. |
| PASS preserveAspectRatio.meetOrSlice = 3 threw exception Error: NotSupportedError: DOM Exception 9. |
| |
| 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 |
| |