| 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="../../fast/js/resources/js-test-pre.js"></script> | 5 <script src="../../fast/js/resources/js-test-pre.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 22 matching lines...) Expand all Loading... |
| 33 { | 33 { |
| 34 actualTestRect = actualRect; | 34 actualTestRect = actualRect; |
| 35 expectedTestRect = expectedRect; | 35 expectedTestRect = expectedRect; |
| 36 shouldBe("actualTestRect.x", "expectedTestRect.x"); | 36 shouldBe("actualTestRect.x", "expectedTestRect.x"); |
| 37 shouldBe("actualTestRect.y", "expectedTestRect.y"); | 37 shouldBe("actualTestRect.y", "expectedTestRect.y"); |
| 38 shouldBe("actualTestRect.width", "expectedTestRect.width"); | 38 shouldBe("actualTestRect.width", "expectedTestRect.width"); |
| 39 shouldBe("actualTestRect.height", "expectedTestRect.height"); | 39 shouldBe("actualTestRect.height", "expectedTestRect.height"); |
| 40 } | 40 } |
| 41 | 41 |
| 42 // Arguments should be mandatory. | 42 // Arguments should be mandatory. |
| 43 shouldThrow("svgText.getSubStringLength()", "'TypeError: Not enough arguments'")
; | 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: Not enough arguments'"
); | 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: Not enough argument
s'"); | 45 shouldThrow("svgText.getStartPositionOfChar()", '"TypeError: Failed to execute \
'getStartPositionOfChar\' on \'SVGTextContentElement\': 1 argument required, but
only 0 present."'); |
| 46 shouldThrow("svgText.getEndPositionOfChar()", "'TypeError: Not enough arguments'
"); | 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: Not enough arguments'"); | 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: Not enough arguments'"); | 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: Not enough arguments'
"); | 49 shouldThrow("svgText.getCharNumAtPosition()", '"TypeError: Failed to execute \'g
etCharNumAtPosition\' on \'SVGTextContentElement\': 1 argument required, but onl
y 0 present."'); |
| 50 shouldThrow("svgText.selectSubString()", "'TypeError: Not enough arguments'"); | 50 shouldThrow("svgText.selectSubString()", '"TypeError: Failed to execute \'select
SubString\' on \'SVGTextContentElement\': 2 arguments required, but only 0 prese
nt."'); |
| 51 shouldThrow("svgText.selectSubString(2)", "'TypeError: Not enough arguments'"); | 51 shouldThrow("svgText.selectSubString(2)", '"TypeError: Failed to execute \'selec
tSubString\' on \'SVGTextContentElement\': 2 arguments required, but only 1 pres
ent."'); |
| 52 | 52 |
| 53 // Should throw an IndexSizeError if charnum is greater than or equal to the num
ber of characters at this node. | 53 // Should throw an IndexSizeError if charnum is greater than or equal to the num
ber of characters at this node. |
| 54 shouldThrow("svgText.getSubStringLength(999, 2)", "'IndexSizeError: Index or siz
e was negative, or greater than the allowed value.'"); | 54 shouldThrow("svgText.getSubStringLength(999, 2)", "'IndexSizeError: Index or siz
e was negative, or greater than the allowed value.'"); |
| 55 shouldThrow("svgText.getStartPositionOfChar(999)", "'IndexSizeError: Index or si
ze was negative, or greater than the allowed value.'"); | 55 shouldThrow("svgText.getStartPositionOfChar(999)", "'IndexSizeError: Index or si
ze was negative, or greater than the allowed value.'"); |
| 56 shouldThrow("svgText.getEndPositionOfChar(999)", "'IndexSizeError: Index or size
was negative, or greater than the allowed value.'"); | 56 shouldThrow("svgText.getEndPositionOfChar(999)", "'IndexSizeError: Index or size
was negative, or greater than the allowed value.'"); |
| 57 shouldThrow("svgText.getExtentOfChar(999)", "'IndexSizeError: Index or size was
negative, or greater than the allowed value.'"); | 57 shouldThrow("svgText.getExtentOfChar(999)", "'IndexSizeError: Index or size was
negative, or greater than the allowed value.'"); |
| 58 shouldThrow("svgText.getRotationOfChar(999)", "'IndexSizeError: Index or size wa
s negative, or greater than the allowed value.'"); | 58 shouldThrow("svgText.getRotationOfChar(999)", "'IndexSizeError: Index or size wa
s negative, or greater than the allowed value.'"); |
| 59 shouldThrow("svgText.selectSubString(999, 2)", "'IndexSizeError: Index or size w
as negative, or greater than the allowed value.'"); | 59 shouldThrow("svgText.selectSubString(999, 2)", "'IndexSizeError: Index or size w
as negative, or greater than the allowed value.'"); |
| 60 | 60 |
| 61 // Should not throw if charnum is negative and wraps to a valid positive index (
-4294967294 wraps to 2). | 61 // Should not throw if charnum is negative and wraps to a valid positive index (
-4294967294 wraps to 2). |
| (...skipping 19 matching lines...) Expand all Loading... |
| 81 shouldBe("svgText.getSubStringLength(2, -1)", "svgText.getSubStringLength(2, 5)"
); | 81 shouldBe("svgText.getSubStringLength(2, -1)", "svgText.getSubStringLength(2, 5)"
); |
| 82 shouldBe("svgText.getSubStringLength(2, 2)", "svgText.getSubStringLength(2, -429
4967294)"); | 82 shouldBe("svgText.getSubStringLength(2, 2)", "svgText.getSubStringLength(2, -429
4967294)"); |
| 83 shouldNotThrow("svgText.selectSubString(2, 999)"); | 83 shouldNotThrow("svgText.selectSubString(2, 999)"); |
| 84 shouldNotThrow("svgText.selectSubString(2, -1)"); | 84 shouldNotThrow("svgText.selectSubString(2, -1)"); |
| 85 shouldNotThrow("svgText.selectSubString(2, -4294967294)"); | 85 shouldNotThrow("svgText.selectSubString(2, -4294967294)"); |
| 86 | 86 |
| 87 </script> | 87 </script> |
| 88 <script src="../../fast/js/resources/js-test-post.js"></script> | 88 <script src="../../fast/js/resources/js-test-post.js"></script> |
| 89 </body> | 89 </body> |
| 90 </html> | 90 </html> |
| OLD | NEW |