OLD | NEW |
1 This test checks the SVGLength API | 1 This test checks the SVGLength 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 length values | 7 Check initial length values |
8 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_NUMBER | 8 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_NUMBER |
9 PASS length.value is 0 | 9 PASS length.value is 0 |
10 PASS length.valueInSpecifiedUnits is 0 | 10 PASS length.valueInSpecifiedUnits is 0 |
11 PASS length.valueAsString is "0" | 11 PASS length.valueAsString is "0" |
12 | 12 |
13 Set value to be 2px | 13 Set value to be 2px |
14 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_PX | 14 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_PX |
15 PASS length.value is 2 | 15 PASS length.value is 2 |
16 PASS length.valueInSpecifiedUnits is 2 | 16 PASS length.valueInSpecifiedUnits is 2 |
17 PASS length.valueAsString is "2px" | 17 PASS length.valueAsString is "2px" |
18 | 18 |
19 Check invalid arguments for 'convertToSpecifiedUnits' | 19 Check invalid arguments for 'convertToSpecifiedUnits' |
20 PASS length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_UNKNOWN) threw exce
ption Error: NotSupportedError: DOM Exception 9. | 20 PASS length.convertToSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_UNKNOWN) threw exce
ption NotSupportedError: The implementation did not support the requested type o
f object or operation.. |
21 PASS length.convertToSpecifiedUnits(-1) threw exception Error: NotSupportedError
: DOM Exception 9. | 21 PASS length.convertToSpecifiedUnits(-1) threw exception NotSupportedError: The i
mplementation did not support the requested type of object or operation.. |
22 PASS length.convertToSpecifiedUnits(11) threw exception Error: NotSupportedError
: DOM Exception 9. | 22 PASS length.convertToSpecifiedUnits(11) threw exception NotSupportedError: The i
mplementation did not support the requested type of object or operation.. |
23 PASS length.convertToSpecifiedUnits('aString') threw exception Error: NotSupport
edError: DOM Exception 9. | 23 PASS length.convertToSpecifiedUnits('aString') threw exception NotSupportedError
: The implementation did not support the requested type of object or operation.. |
24 PASS length.convertToSpecifiedUnits(length) threw exception Error: NotSupportedE
rror: DOM Exception 9. | 24 PASS length.convertToSpecifiedUnits(length) threw exception NotSupportedError: T
he implementation did not support the requested type of object or operation.. |
25 PASS length.convertToSpecifiedUnits(svgElement) threw exception Error: NotSuppor
tedError: DOM Exception 9. | 25 PASS length.convertToSpecifiedUnits(svgElement) threw exception NotSupportedErro
r: The implementation did not support the requested type of object or operation.
. |
26 PASS length.convertToSpecifiedUnits() threw exception TypeError: Not enough argu
ments. | 26 PASS length.convertToSpecifiedUnits() threw exception TypeError: Not enough argu
ments. |
27 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_PX | 27 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_PX |
28 PASS length.value is 2 | 28 PASS length.value is 2 |
29 PASS length.valueInSpecifiedUnits is 2 | 29 PASS length.valueInSpecifiedUnits is 2 |
30 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_PX | 30 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_PX |
31 | 31 |
32 Check invalid arguments for 'newValueSpecifiedUnits' | 32 Check invalid arguments for 'newValueSpecifiedUnits' |
33 PASS length.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_UNKNOWN, 4) threw ex
ception Error: NotSupportedError: DOM Exception 9. | 33 PASS length.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_UNKNOWN, 4) threw ex
ception NotSupportedError: The implementation did not support the requested type
of object or operation.. |
34 PASS length.newValueSpecifiedUnits(-1, 4) threw exception Error: NotSupportedErr
or: DOM Exception 9. | 34 PASS length.newValueSpecifiedUnits(-1, 4) threw exception NotSupportedError: The
implementation did not support the requested type of object or operation.. |
35 PASS length.newValueSpecifiedUnits(11, 4) threw exception Error: NotSupportedErr
or: DOM Exception 9. | 35 PASS length.newValueSpecifiedUnits(11, 4) threw exception NotSupportedError: The
implementation did not support the requested type of object or operation.. |
36 PASS length.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX, 'aString') is un
defined. | 36 PASS length.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX, 'aString') is un
defined. |
37 PASS length.value is NaN | 37 PASS length.value is NaN |
38 PASS length.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX, 0) is undefined. | 38 PASS length.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX, 0) is undefined. |
39 PASS length.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX, length) is undef
ined. | 39 PASS length.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX, length) is undef
ined. |
40 PASS length.value is NaN | 40 PASS length.value is NaN |
41 PASS length.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX, 0) is undefined. | 41 PASS length.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX, 0) is undefined. |
42 PASS length.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX, svgElement) is u
ndefined. | 42 PASS length.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX, svgElement) is u
ndefined. |
43 PASS length.value is NaN | 43 PASS length.value is NaN |
44 PASS length.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX) threw exception
TypeError: Not enough arguments. | 44 PASS length.newValueSpecifiedUnits(SVGLength.SVG_LENGTHTYPE_PX) threw exception
TypeError: Not enough arguments. |
45 PASS length.newValueSpecifiedUnits('aString', 4) threw exception Error: NotSuppo
rtedError: DOM Exception 9. | 45 PASS length.newValueSpecifiedUnits('aString', 4) threw exception NotSupportedErr
or: The implementation did not support the requested type of object or operation
.. |
46 PASS length.newValueSpecifiedUnits(length, 4) threw exception Error: NotSupporte
dError: DOM Exception 9. | 46 PASS length.newValueSpecifiedUnits(length, 4) threw exception NotSupportedError:
The implementation did not support the requested type of object or operation.. |
47 PASS length.newValueSpecifiedUnits(svgElement, 4) threw exception Error: NotSupp
ortedError: DOM Exception 9. | 47 PASS length.newValueSpecifiedUnits(svgElement, 4) threw exception NotSupportedEr
ror: The implementation did not support the requested type of object or operatio
n.. |
48 PASS length.newValueSpecifiedUnits('aString', 'aString') threw exception Error:
NotSupportedError: DOM Exception 9. | 48 PASS length.newValueSpecifiedUnits('aString', 'aString') threw exception NotSupp
ortedError: The implementation did not support the requested type of object or o
peration.. |
49 PASS length.newValueSpecifiedUnits(length, length) threw exception Error: NotSup
portedError: DOM Exception 9. | 49 PASS length.newValueSpecifiedUnits(length, length) threw exception NotSupportedE
rror: The implementation did not support the requested type of object or operati
on.. |
50 PASS length.newValueSpecifiedUnits(svgElement, svgElement) threw exception Error
: NotSupportedError: DOM Exception 9. | 50 PASS length.newValueSpecifiedUnits(svgElement, svgElement) threw exception NotSu
pportedError: The implementation did not support the requested type of object or
operation.. |
51 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_PX | 51 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_PX |
52 PASS length.value is 2 | 52 PASS length.value is 2 |
53 PASS length.valueInSpecifiedUnits is 2 | 53 PASS length.valueInSpecifiedUnits is 2 |
54 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_PX | 54 PASS length.unitType is SVGLength.SVG_LENGTHTYPE_PX |
55 PASS successfullyParsed is true | 55 PASS successfullyParsed is true |
56 | 56 |
57 TEST COMPLETE | 57 TEST COMPLETE |
58 | 58 |
OLD | NEW |