| OLD | NEW |
| 1 This test checks SVGLength - converting from px to all other unit types | 1 This test checks SVGLength - converting from px to all other unit types |
| 2 | 2 |
| 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
| 4 | 4 |
| 5 | 5 |
| 6 | 6 |
| 7 Set value to be 2px | 7 Set value to be 2px |
| 8 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_PX | 8 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_PX |
| 9 PASS length.value is 2 | 9 PASS length.value is 2 |
| 10 PASS length.valueInSpecifiedUnits is 2 | 10 PASS length.valueInSpecifiedUnits is 2 |
| 11 PASS length.valueAsString is "2px" | 11 PASS length.valueAsString is "2px" |
| 12 | 12 |
| 13 Convert from px to unitless | 13 Convert from px to unitless |
| 14 PASS length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_NUMBER) is undefine
d. | 14 PASS length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_NUMBER) is undefine
d. |
| 15 PASS length.valueAsString is "2" | 15 PASS length.valueAsString is "2" |
| 16 PASS length.value is 2 | 16 PASS length.value is 2 |
| 17 PASS length.valueInSpecifiedUnits is 2 | 17 PASS length.valueInSpecifiedUnits is 2 |
| 18 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_NUMBER | 18 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_NUMBER |
| 19 | 19 |
| 20 Reset to 2px | 20 Reset to 2px |
| 21 | 21 |
| 22 Try converting from px to percentage, should fail as the SVGLength is not associ
ated with a SVGSVGElement, and thus no viewport information is available | 22 Try converting from px to percentage, should fail as the SVGLength is not associ
ated with a SVGSVGElement, and thus no viewport information is available |
| 23 PASS length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE) threw e
xception NotSupportedError: Failed to execute 'convertToSpecifiedUnits' on 'SVGL
ength': The viewport could not be determined.. | 23 PASS length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PERCENTAGE) threw e
xception NotSupportedError: Failed to execute 'convertToSpecifiedUnits' on 'SVGL
ength': Could not resolve relative length.. |
| 24 PASS length.valueAsString is "2px" | 24 PASS length.valueAsString is "2px" |
| 25 PASS length.value is 2 | 25 PASS length.value is 2 |
| 26 PASS length.valueInSpecifiedUnits is 2 | 26 PASS length.valueInSpecifiedUnits is 2 |
| 27 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_PX | 27 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_PX |
| 28 | 28 |
| 29 Reset to 2px | 29 Reset to 2px |
| 30 | 30 |
| 31 Try converting from px to ems, should fail as the SVGLength is not associated wi
th a SVGSVGElement, and thus no font-size information is available | 31 Try converting from px to ems, should fail as the SVGLength is not associated wi
th a SVGSVGElement, and thus no font-size information is available |
| 32 PASS length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_EMS) threw exceptio
n NotSupportedError: Failed to execute 'convertToSpecifiedUnits' on 'SVGLength':
No context could be found.. | 32 PASS length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_EMS) threw exceptio
n NotSupportedError: Failed to execute 'convertToSpecifiedUnits' on 'SVGLength':
Could not resolve relative length.. |
| 33 PASS length.valueAsString is "2px" | 33 PASS length.valueAsString is "2px" |
| 34 PASS length.value is 2 | 34 PASS length.value is 2 |
| 35 PASS length.valueInSpecifiedUnits is 2 | 35 PASS length.valueInSpecifiedUnits is 2 |
| 36 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_PX | 36 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_PX |
| 37 | 37 |
| 38 Reset to 2px | 38 Reset to 2px |
| 39 | 39 |
| 40 Try converting from px to exs, should fail as the SVGLength is not associated wi
th a SVGSVGElement, and thus no font-size information is available | 40 Try converting from px to exs, should fail as the SVGLength is not associated wi
th a SVGSVGElement, and thus no font-size information is available |
| 41 PASS length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_EXS) threw exceptio
n NotSupportedError: Failed to execute 'convertToSpecifiedUnits' on 'SVGLength':
No context could be found.. | 41 PASS length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_EXS) threw exceptio
n NotSupportedError: Failed to execute 'convertToSpecifiedUnits' on 'SVGLength':
Could not resolve relative length.. |
| 42 PASS length.valueAsString is "2px" | 42 PASS length.valueAsString is "2px" |
| 43 PASS length.value is 2 | 43 PASS length.value is 2 |
| 44 PASS length.valueInSpecifiedUnits is 2 | 44 PASS length.valueInSpecifiedUnits is 2 |
| 45 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_PX | 45 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_PX |
| 46 | 46 |
| 47 Reset to 2px | 47 Reset to 2px |
| 48 | 48 |
| 49 Convert from px to cm | 49 Convert from px to cm |
| 50 PASS length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_CM) is undefined. | 50 PASS length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_CM) is undefined. |
| 51 PASS length.valueAsString is "0.0529167cm" | 51 PASS length.valueAsString is "0.0529167cm" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 Convert from px to pc | 85 Convert from px to pc |
| 86 PASS length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PC) is undefined. | 86 PASS length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PC) is undefined. |
| 87 PASS length.valueInSpecifiedUnits.toFixed(3) is "0.125" | 87 PASS length.valueInSpecifiedUnits.toFixed(3) is "0.125" |
| 88 PASS length.value.toFixed(1) is "2.0" | 88 PASS length.value.toFixed(1) is "2.0" |
| 89 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_PC | 89 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_PC |
| 90 PASS successfullyParsed is true | 90 PASS successfullyParsed is true |
| 91 | 91 |
| 92 TEST COMPLETE | 92 TEST COMPLETE |
| 93 | 93 |
| OLD | NEW |