| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <link rel="help" href="http://www.w3.org/TR/SVG2/text.html#InterfaceSVGTextConte
ntElement"> | 4 <link rel="help" href="http://www.w3.org/TR/SVG2/text.html#InterfaceSVGTextConte
ntElement"> |
| 5 <script src="../../resources/js-test.js"></script> | 5 <script src="../../resources/js-test.js"></script> |
| 6 </head> | 6 </head> |
| 7 <body> | 7 <body> |
| 8 <script> | 8 <script> |
| 9 description("Check that SVGTextContentElement methods' parameters are correctly
validated"); | 9 description("Check that SVGTextContentElement methods' parameters are correctly
validated"); |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 } | 40 } |
| 41 | 41 |
| 42 // Arguments should be mandatory. | 42 // Arguments should be mandatory. |
| 43 shouldThrow("svgText.getSubStringLength()", '"TypeError: Failed to execute \'get
SubStringLength\' on \'SVGTextContentElement\': 2 arguments required, but only 0
present."'); | 43 shouldThrow("svgText.getSubStringLength()", '"TypeError: Failed to execute \'get
SubStringLength\' on \'SVGTextContentElement\': 2 arguments required, but only 0
present."'); |
| 44 shouldThrow("svgText.getSubStringLength(2)", '"TypeError: Failed to execute \'ge
tSubStringLength\' on \'SVGTextContentElement\': 2 arguments required, but only
1 present."'); | 44 shouldThrow("svgText.getSubStringLength(2)", '"TypeError: Failed to execute \'ge
tSubStringLength\' on \'SVGTextContentElement\': 2 arguments required, but only
1 present."'); |
| 45 shouldThrow("svgText.getStartPositionOfChar()", '"TypeError: Failed to execute \
'getStartPositionOfChar\' on \'SVGTextContentElement\': 1 argument required, but
only 0 present."'); | 45 shouldThrow("svgText.getStartPositionOfChar()", '"TypeError: Failed to execute \
'getStartPositionOfChar\' on \'SVGTextContentElement\': 1 argument required, but
only 0 present."'); |
| 46 shouldThrow("svgText.getEndPositionOfChar()", '"TypeError: Failed to execute \'g
etEndPositionOfChar\' on \'SVGTextContentElement\': 1 argument required, but onl
y 0 present."'); | 46 shouldThrow("svgText.getEndPositionOfChar()", '"TypeError: Failed to execute \'g
etEndPositionOfChar\' on \'SVGTextContentElement\': 1 argument required, but onl
y 0 present."'); |
| 47 shouldThrow("svgText.getExtentOfChar()", '"TypeError: Failed to execute \'getExt
entOfChar\' on \'SVGTextContentElement\': 1 argument required, but only 0 presen
t."'); | 47 shouldThrow("svgText.getExtentOfChar()", '"TypeError: Failed to execute \'getExt
entOfChar\' on \'SVGTextContentElement\': 1 argument required, but only 0 presen
t."'); |
| 48 shouldThrow("svgText.getRotationOfChar()", '"TypeError: Failed to execute \'getR
otationOfChar\' on \'SVGTextContentElement\': 1 argument required, but only 0 pr
esent."'); | 48 shouldThrow("svgText.getRotationOfChar()", '"TypeError: Failed to execute \'getR
otationOfChar\' on \'SVGTextContentElement\': 1 argument required, but only 0 pr
esent."'); |
| 49 shouldThrow("svgText.getCharNumAtPosition()", '"TypeError: Failed to execute \'g
etCharNumAtPosition\' on \'SVGTextContentElement\': 1 argument required, but onl
y 0 present."'); | 49 shouldThrow("svgText.getCharNumAtPosition()", '"TypeError: Failed to execute \'g
etCharNumAtPosition\' on \'SVGTextContentElement\': 1 argument required, but onl
y 0 present."'); |
| 50 shouldThrow("svgText.getCharNumAtPosition('aString')", "'TypeError: Type error'"
); | 50 shouldThrow("svgText.getCharNumAtPosition('aString')", '"TypeError: Failed to ex
ecute \'getCharNumAtPosition\' on \'SVGTextContentElement\': parameter 1 is not
of type \'SVGPoint\'."'); |
| 51 shouldThrow("svgText.getCharNumAtPosition(svgText)", "'TypeError: Type error'"); | 51 shouldThrow("svgText.getCharNumAtPosition(svgText)", '"TypeError: Failed to exec
ute \'getCharNumAtPosition\' on \'SVGTextContentElement\': parameter 1 is not of
type \'SVGPoint\'."'); |
| 52 shouldThrow("svgText.selectSubString()", '"TypeError: Failed to execute \'select
SubString\' on \'SVGTextContentElement\': 2 arguments required, but only 0 prese
nt."'); | 52 shouldThrow("svgText.selectSubString()", '"TypeError: Failed to execute \'select
SubString\' on \'SVGTextContentElement\': 2 arguments required, but only 0 prese
nt."'); |
| 53 shouldThrow("svgText.selectSubString(2)", '"TypeError: Failed to execute \'selec
tSubString\' on \'SVGTextContentElement\': 2 arguments required, but only 1 pres
ent."'); | 53 shouldThrow("svgText.selectSubString(2)", '"TypeError: Failed to execute \'selec
tSubString\' on \'SVGTextContentElement\': 2 arguments required, but only 1 pres
ent."'); |
| 54 | 54 |
| 55 // Should throw an IndexSizeError if charnum is greater than or equal to the num
ber of characters at this node. | 55 // Should throw an IndexSizeError if charnum is greater than or equal to the num
ber of characters at this node. |
| 56 shouldThrow("svgText.getSubStringLength(999, 2)", "'IndexSizeError: Index or siz
e was negative, or greater than the allowed value.'"); | 56 shouldThrow("svgText.getSubStringLength(999, 2)", "'IndexSizeError: Index or siz
e was negative, or greater than the allowed value.'"); |
| 57 shouldThrow("svgText.getStartPositionOfChar(999)", "'IndexSizeError: Index or si
ze was negative, or greater than the allowed value.'"); | 57 shouldThrow("svgText.getStartPositionOfChar(999)", "'IndexSizeError: Index or si
ze was negative, or greater than the allowed value.'"); |
| 58 shouldThrow("svgText.getEndPositionOfChar(999)", "'IndexSizeError: Index or size
was negative, or greater than the allowed value.'"); | 58 shouldThrow("svgText.getEndPositionOfChar(999)", "'IndexSizeError: Index or size
was negative, or greater than the allowed value.'"); |
| 59 shouldThrow("svgText.getExtentOfChar(999)", "'IndexSizeError: Index or size was
negative, or greater than the allowed value.'"); | 59 shouldThrow("svgText.getExtentOfChar(999)", "'IndexSizeError: Index or size was
negative, or greater than the allowed value.'"); |
| 60 shouldThrow("svgText.getRotationOfChar(999)", "'IndexSizeError: Index or size wa
s negative, or greater than the allowed value.'"); | 60 shouldThrow("svgText.getRotationOfChar(999)", "'IndexSizeError: Index or size wa
s negative, or greater than the allowed value.'"); |
| 61 shouldThrow("svgText.selectSubString(999, 2)", "'IndexSizeError: Index or size w
as negative, or greater than the allowed value.'"); | 61 shouldThrow("svgText.selectSubString(999, 2)", "'IndexSizeError: Index or size w
as negative, or greater than the allowed value.'"); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 82 shouldBe("svgText.getSubStringLength(2, 999)", "svgText.getSubStringLength(2, 5)
"); | 82 shouldBe("svgText.getSubStringLength(2, 999)", "svgText.getSubStringLength(2, 5)
"); |
| 83 shouldBe("svgText.getSubStringLength(2, -1)", "svgText.getSubStringLength(2, 5)"
); | 83 shouldBe("svgText.getSubStringLength(2, -1)", "svgText.getSubStringLength(2, 5)"
); |
| 84 shouldBe("svgText.getSubStringLength(2, 2)", "svgText.getSubStringLength(2, -429
4967294)"); | 84 shouldBe("svgText.getSubStringLength(2, 2)", "svgText.getSubStringLength(2, -429
4967294)"); |
| 85 shouldNotThrow("svgText.selectSubString(2, 999)"); | 85 shouldNotThrow("svgText.selectSubString(2, 999)"); |
| 86 shouldNotThrow("svgText.selectSubString(2, -1)"); | 86 shouldNotThrow("svgText.selectSubString(2, -1)"); |
| 87 shouldNotThrow("svgText.selectSubString(2, -4294967294)"); | 87 shouldNotThrow("svgText.selectSubString(2, -4294967294)"); |
| 88 | 88 |
| 89 </script> | 89 </script> |
| 90 </body> | 90 </body> |
| 91 </html> | 91 </html> |
| OLD | NEW |