| OLD | NEW |
| 1 This test checks the SVGAngle API | 1 This test checks the SVGAngle API |
| 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 Check initial angle values | 7 Check initial angle values |
| 8 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED | 8 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED |
| 9 PASS angle.valueAsString is "0" | 9 PASS angle.valueAsString is "0" |
| 10 PASS angle.value is 0 | 10 PASS angle.value is 0 |
| 11 PASS angle.valueInSpecifiedUnits is 0 | 11 PASS angle.valueInSpecifiedUnits is 0 |
| 12 | 12 |
| 13 Check invalid arguments for 'convertToSpecifiedUnits' | 13 Check invalid arguments for 'convertToSpecifiedUnits' |
| 14 PASS angle.convertToSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_UNKNOWN) threw excepti
on Error: NotSupportedError: DOM Exception 9. | 14 PASS angle.convertToSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_UNKNOWN) threw excepti
on NotSupportedError: The implementation did not support the requested type of o
bject or operation.. |
| 15 PASS angle.convertToSpecifiedUnits(-1) threw exception Error: NotSupportedError:
DOM Exception 9. | 15 PASS angle.convertToSpecifiedUnits(-1) threw exception NotSupportedError: The im
plementation did not support the requested type of object or operation.. |
| 16 PASS angle.convertToSpecifiedUnits(5) threw exception Error: NotSupportedError:
DOM Exception 9. | 16 PASS angle.convertToSpecifiedUnits(5) threw exception NotSupportedError: The imp
lementation did not support the requested type of object or operation.. |
| 17 PASS angle.convertToSpecifiedUnits('aString') threw exception Error: NotSupporte
dError: DOM Exception 9. | 17 PASS angle.convertToSpecifiedUnits('aString') threw exception NotSupportedError:
The implementation did not support the requested type of object or operation.. |
| 18 PASS angle.convertToSpecifiedUnits(angle) threw exception Error: NotSupportedErr
or: DOM Exception 9. | 18 PASS angle.convertToSpecifiedUnits(angle) threw exception NotSupportedError: The
implementation did not support the requested type of object or operation.. |
| 19 PASS angle.convertToSpecifiedUnits(svgElement) threw exception Error: NotSupport
edError: DOM Exception 9. | 19 PASS angle.convertToSpecifiedUnits(svgElement) threw exception NotSupportedError
: The implementation did not support the requested type of object or operation.. |
| 20 PASS angle.convertToSpecifiedUnits() threw exception TypeError: Not enough argum
ents. | 20 PASS angle.convertToSpecifiedUnits() threw exception TypeError: Not enough argum
ents. |
| 21 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED | 21 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED |
| 22 | 22 |
| 23 Check valid arguments for 'convertToSpecifiedUnits', that should only modify the
'valueAsString' | 23 Check valid arguments for 'convertToSpecifiedUnits', that should only modify the
'valueAsString' |
| 24 PASS angle.convertToSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_RAD) is undefined. | 24 PASS angle.convertToSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_RAD) is undefined. |
| 25 PASS angle.valueAsString is "0rad" | 25 PASS angle.valueAsString is "0rad" |
| 26 PASS angle.value is 0 | 26 PASS angle.value is 0 |
| 27 PASS angle.valueInSpecifiedUnits is 0 | 27 PASS angle.valueInSpecifiedUnits is 0 |
| 28 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_RAD | 28 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_RAD |
| 29 PASS angle.convertToSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_GRAD) is undefined. | 29 PASS angle.convertToSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_GRAD) is undefined. |
| 30 PASS angle.valueAsString is "0grad" | 30 PASS angle.valueAsString is "0grad" |
| 31 PASS angle.value is 0 | 31 PASS angle.value is 0 |
| 32 PASS angle.valueInSpecifiedUnits is 0 | 32 PASS angle.valueInSpecifiedUnits is 0 |
| 33 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_GRAD | 33 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_GRAD |
| 34 PASS angle.convertToSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG) is undefined. | 34 PASS angle.convertToSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG) is undefined. |
| 35 PASS angle.valueAsString is "0deg" | 35 PASS angle.valueAsString is "0deg" |
| 36 PASS angle.value is 0 | 36 PASS angle.value is 0 |
| 37 PASS angle.valueInSpecifiedUnits is 0 | 37 PASS angle.valueInSpecifiedUnits is 0 |
| 38 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_DEG | 38 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_DEG |
| 39 PASS angle.convertToSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_UNSPECIFIED) is undefi
ned. | 39 PASS angle.convertToSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_UNSPECIFIED) is undefi
ned. |
| 40 PASS angle.valueAsString is "0" | 40 PASS angle.valueAsString is "0" |
| 41 PASS angle.value is 0 | 41 PASS angle.value is 0 |
| 42 PASS angle.valueInSpecifiedUnits is 0 | 42 PASS angle.valueInSpecifiedUnits is 0 |
| 43 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED | 43 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED |
| 44 | 44 |
| 45 Check invalid arguments for 'newValueSpecifiedUnits' | 45 Check invalid arguments for 'newValueSpecifiedUnits' |
| 46 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_UNKNOWN, 50) threw exce
ption Error: NotSupportedError: DOM Exception 9. | 46 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_UNKNOWN, 50) threw exce
ption NotSupportedError: The implementation did not support the requested type o
f object or operation.. |
| 47 PASS angle.newValueSpecifiedUnits(-1, 50) threw exception Error: NotSupportedErr
or: DOM Exception 9. | 47 PASS angle.newValueSpecifiedUnits(-1, 50) threw exception NotSupportedError: The
implementation did not support the requested type of object or operation.. |
| 48 PASS angle.newValueSpecifiedUnits(5, 50) threw exception Error: NotSupportedErro
r: DOM Exception 9. | 48 PASS angle.newValueSpecifiedUnits(5, 50) threw exception NotSupportedError: The
implementation did not support the requested type of object or operation.. |
| 49 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG) threw exception Ty
peError: Not enough arguments. | 49 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG) threw exception Ty
peError: Not enough arguments. |
| 50 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG, 'aString') is unde
fined. | 50 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG, 'aString') is unde
fined. |
| 51 PASS angle.value is NaN | 51 PASS angle.value is NaN |
| 52 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG, 0) is undefined. | 52 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG, 0) is undefined. |
| 53 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG, angle) is undefine
d. | 53 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG, angle) is undefine
d. |
| 54 PASS angle.value is NaN | 54 PASS angle.value is NaN |
| 55 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG, svgElement) is und
efined. | 55 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG, svgElement) is und
efined. |
| 56 PASS angle.value is NaN | 56 PASS angle.value is NaN |
| 57 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG) threw exception Ty
peError: Not enough arguments. | 57 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG) threw exception Ty
peError: Not enough arguments. |
| 58 PASS angle.newValueSpecifiedUnits('aString', 4) threw exception Error: NotSuppor
tedError: DOM Exception 9. | 58 PASS angle.newValueSpecifiedUnits('aString', 4) threw exception NotSupportedErro
r: The implementation did not support the requested type of object or operation.
. |
| 59 PASS angle.newValueSpecifiedUnits(angle, 4) threw exception Error: NotSupportedE
rror: DOM Exception 9. | 59 PASS angle.newValueSpecifiedUnits(angle, 4) threw exception NotSupportedError: T
he implementation did not support the requested type of object or operation.. |
| 60 PASS angle.newValueSpecifiedUnits(svgElement, 4) threw exception Error: NotSuppo
rtedError: DOM Exception 9. | 60 PASS angle.newValueSpecifiedUnits(svgElement, 4) threw exception NotSupportedErr
or: The implementation did not support the requested type of object or operation
.. |
| 61 PASS angle.newValueSpecifiedUnits('aString', 'aString') threw exception Error: N
otSupportedError: DOM Exception 9. | 61 PASS angle.newValueSpecifiedUnits('aString', 'aString') threw exception NotSuppo
rtedError: The implementation did not support the requested type of object or op
eration.. |
| 62 PASS angle.newValueSpecifiedUnits(angle, angle) threw exception Error: NotSuppor
tedError: DOM Exception 9. | 62 PASS angle.newValueSpecifiedUnits(angle, angle) threw exception NotSupportedErro
r: The implementation did not support the requested type of object or operation.
. |
| 63 PASS angle.newValueSpecifiedUnits(svgElement, svgElement) threw exception Error:
NotSupportedError: DOM Exception 9. | 63 PASS angle.newValueSpecifiedUnits(svgElement, svgElement) threw exception NotSup
portedError: The implementation did not support the requested type of object or
operation.. |
| 64 PASS angle.newValueSpecifiedUnits() threw exception TypeError: Not enough argume
nts. | 64 PASS angle.newValueSpecifiedUnits() threw exception TypeError: Not enough argume
nts. |
| 65 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_DEG | 65 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_DEG |
| 66 | 66 |
| 67 Check valid arguments for 'newValueSpecifiedUnits', that should only modify the
'valueAsString' | 67 Check valid arguments for 'newValueSpecifiedUnits', that should only modify the
'valueAsString' |
| 68 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_RAD, parseFloat(Math.PI
.toFixed(5))) is undefined. | 68 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_RAD, parseFloat(Math.PI
.toFixed(5))) is undefined. |
| 69 PASS angle.valueAsString is "3.14159rad" | 69 PASS angle.valueAsString is "3.14159rad" |
| 70 PASS angle.value.toFixed(1) is "180.0" | 70 PASS angle.value.toFixed(1) is "180.0" |
| 71 PASS angle.valueInSpecifiedUnits.toFixed(5) is Math.PI.toFixed(5) | 71 PASS angle.valueInSpecifiedUnits.toFixed(5) is Math.PI.toFixed(5) |
| 72 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_RAD | 72 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_RAD |
| 73 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_GRAD, 400) is undefined
. | 73 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_GRAD, 400) is undefined
. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 84 PASS angle.valueAsString is "180" | 84 PASS angle.valueAsString is "180" |
| 85 PASS angle.value is 180 | 85 PASS angle.value is 180 |
| 86 PASS angle.valueInSpecifiedUnits is 180 | 86 PASS angle.valueInSpecifiedUnits is 180 |
| 87 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED | 87 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED |
| 88 | 88 |
| 89 Reset to initial angle state | 89 Reset to initial angle state |
| 90 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_UNSPECIFIED, 0) is unde
fined. | 90 PASS angle.newValueSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_UNSPECIFIED, 0) is unde
fined. |
| 91 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED | 91 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED |
| 92 | 92 |
| 93 Check setting invalid 'valueAsString' arguments | 93 Check setting invalid 'valueAsString' arguments |
| 94 PASS angle.valueAsString = '10px' threw exception Error: SyntaxError: DOM Except
ion 12. | 94 PASS angle.valueAsString = '10px' threw exception SyntaxError: An invalid or ill
egal string was specified.. |
| 95 PASS angle.valueAsString is "0" | 95 PASS angle.valueAsString is "0" |
| 96 PASS angle.value is 0 | 96 PASS angle.value is 0 |
| 97 PASS angle.valueInSpecifiedUnits is 0 | 97 PASS angle.valueInSpecifiedUnits is 0 |
| 98 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED | 98 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED |
| 99 PASS angle.valueAsString = '10x' threw exception Error: SyntaxError: DOM Excepti
on 12. | 99 PASS angle.valueAsString = '10x' threw exception SyntaxError: An invalid or ille
gal string was specified.. |
| 100 PASS angle.valueAsString is "0" | 100 PASS angle.valueAsString is "0" |
| 101 PASS angle.value is 0 | 101 PASS angle.value is 0 |
| 102 PASS angle.valueInSpecifiedUnits is 0 | 102 PASS angle.valueInSpecifiedUnits is 0 |
| 103 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED | 103 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED |
| 104 PASS angle.valueAsString = '5graD' threw exception Error: SyntaxError: DOM Excep
tion 12. | 104 PASS angle.valueAsString = '5graD' threw exception SyntaxError: An invalid or il
legal string was specified.. |
| 105 PASS angle.valueAsString is "0" | 105 PASS angle.valueAsString is "0" |
| 106 PASS angle.value is 0 | 106 PASS angle.value is 0 |
| 107 PASS angle.valueInSpecifiedUnits is 0 | 107 PASS angle.valueInSpecifiedUnits is 0 |
| 108 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED | 108 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED |
| 109 PASS angle.valueAsString = '5Rad' threw exception Error: SyntaxError: DOM Except
ion 12. | 109 PASS angle.valueAsString = '5Rad' threw exception SyntaxError: An invalid or ill
egal string was specified.. |
| 110 PASS angle.valueAsString is "0" | 110 PASS angle.valueAsString is "0" |
| 111 PASS angle.value is 0 | 111 PASS angle.value is 0 |
| 112 PASS angle.valueInSpecifiedUnits is 0 | 112 PASS angle.valueInSpecifiedUnits is 0 |
| 113 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED | 113 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED |
| 114 PASS angle.valueAsString = ',5 rad' threw exception Error: SyntaxError: DOM Exce
ption 12. | 114 PASS angle.valueAsString = ',5 rad' threw exception SyntaxError: An invalid or i
llegal string was specified.. |
| 115 PASS angle.valueAsString is "0" | 115 PASS angle.valueAsString is "0" |
| 116 PASS angle.value is 0 | 116 PASS angle.value is 0 |
| 117 PASS angle.valueInSpecifiedUnits is 0 | 117 PASS angle.valueInSpecifiedUnits is 0 |
| 118 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED | 118 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED |
| 119 | 119 |
| 120 Check setting invalid 'valueInSpecifiedUnits' arguments | 120 Check setting invalid 'valueInSpecifiedUnits' arguments |
| 121 PASS angle.valueInSpecifiedUnits = 'test' is 'test' | 121 PASS angle.valueInSpecifiedUnits = 'test' is 'test' |
| 122 PASS angle.value is NaN | 122 PASS angle.value is NaN |
| 123 PASS angle.valueInSpecifiedUnits is NaN | 123 PASS angle.valueInSpecifiedUnits is NaN |
| 124 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED | 124 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_UNSPECIFIED |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_GRAD | 167 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_GRAD |
| 168 | 168 |
| 169 Now convert the GRAD value into a RAD value, and assure that all properties have
been synchronized | 169 Now convert the GRAD value into a RAD value, and assure that all properties have
been synchronized |
| 170 PASS angle.convertToSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_RAD) is undefined. | 170 PASS angle.convertToSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_RAD) is undefined. |
| 171 PASS angle.value.toFixed(1) is "180.0" | 171 PASS angle.value.toFixed(1) is "180.0" |
| 172 PASS angle.valueInSpecifiedUnits.toFixed(5) is "3.14159" | 172 PASS angle.valueInSpecifiedUnits.toFixed(5) is "3.14159" |
| 173 PASS angle.valueAsString is "3.14159rad" | 173 PASS angle.valueAsString is "3.14159rad" |
| 174 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_RAD | 174 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_RAD |
| 175 | 175 |
| 176 Now try converting the RAD value into an unknown value, that should fail and thr
ow | 176 Now try converting the RAD value into an unknown value, that should fail and thr
ow |
| 177 PASS angle.convertToSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_UNKNOWN) threw excepti
on Error: NotSupportedError: DOM Exception 9. | 177 PASS angle.convertToSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_UNKNOWN) threw excepti
on NotSupportedError: The implementation did not support the requested type of o
bject or operation.. |
| 178 PASS angle.value.toFixed(1) is "180.0" | 178 PASS angle.value.toFixed(1) is "180.0" |
| 179 PASS angle.valueInSpecifiedUnits.toFixed(5) is "3.14159" | 179 PASS angle.valueInSpecifiedUnits.toFixed(5) is "3.14159" |
| 180 PASS angle.valueAsString is "3.14159rad" | 180 PASS angle.valueAsString is "3.14159rad" |
| 181 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_RAD | 181 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_RAD |
| 182 | 182 |
| 183 Now convert the RAD value into a DEG value, and assure that all properties have
been synchronized | 183 Now convert the RAD value into a DEG value, and assure that all properties have
been synchronized |
| 184 PASS angle.convertToSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG) is undefined. | 184 PASS angle.convertToSpecifiedUnits(SVGAngle.SVG_ANGLETYPE_DEG) is undefined. |
| 185 PASS angle.value.toFixed(1) is "180.0" | 185 PASS angle.value.toFixed(1) is "180.0" |
| 186 PASS angle.valueInSpecifiedUnits.toFixed(1) is "180.0" | 186 PASS angle.valueInSpecifiedUnits.toFixed(1) is "180.0" |
| 187 PASS angle.valueAsString is "180deg" | 187 PASS angle.valueAsString is "180deg" |
| 188 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_DEG | 188 PASS angle.unitType is SVGAngle.SVG_ANGLETYPE_DEG |
| 189 PASS successfullyParsed is true | 189 PASS successfullyParsed is true |
| 190 | 190 |
| 191 TEST COMPLETE | 191 TEST COMPLETE |
| 192 | 192 |
| OLD | NEW |