Complete test of the SVGTextContentElement API On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". Test SVGTextContentElement SVG DOM properties PASS svgText.textLength.baseVal.value.toFixed(1) is "200.0" PASS svgText.lengthAdjust.baseVal is SVGTextContentElement.LENGTHADJUST_SPACINGANDGLYPHS Test getNumberOfChars() API PASS svgText.getNumberOfChars() is 4 Test getComputedTextLength() API PASS lengthToString(svgText.getComputedTextLength()) is "200.0" Test getSubStringLength() API PASS lengthToString(svgText.getSubStringLength(0, 1)) is "61.5" PASS lengthToString(svgText.getSubStringLength(0, 2)) is "117.9" PASS lengthToString(svgText.getSubStringLength(0, 3)) is "169.2" PASS lengthToString(svgText.getSubStringLength(0, 4)) is "200.0" PASS lengthToString(svgText.getSubStringLength(1, 1)) is "56.4" PASS lengthToString(svgText.getSubStringLength(1, 2)) is "107.7" PASS lengthToString(svgText.getSubStringLength(1, 3)) is "138.5" PASS lengthToString(svgText.getSubStringLength(2, 1)) is "51.3" PASS lengthToString(svgText.getSubStringLength(2, 2)) is "82.1" PASS lengthToString(svgText.getSubStringLength(3, 1)) is "30.8" Test getStartPositionOfChar() API PASS pointToString(svgText.getStartPositionOfChar(0)) is "(10.0,20.0)" PASS pointToString(svgText.getStartPositionOfChar(1)) is "(71.5,20.0)" PASS pointToString(svgText.getStartPositionOfChar(2)) is "(127.9,20.0)" PASS pointToString(svgText.getStartPositionOfChar(3)) is "(179.2,20.0)" Test getEndPositionOfChar() API PASS pointToString(svgText.getEndPositionOfChar(0)) is "(71.5,20.0)" PASS pointToString(svgText.getEndPositionOfChar(1)) is "(127.9,20.0)" PASS pointToString(svgText.getEndPositionOfChar(2)) is "(179.2,20.0)" PASS pointToString(svgText.getEndPositionOfChar(3)) is "(210.0,20.0)" Test getExtentOfChar() API FAIL rectToString(svgText.getExtentOfChar(0)) should be (10.0,1.9)-(61.5x22.3). Was (10.0,2.0)-(61.5x22.0). FAIL rectToString(svgText.getExtentOfChar(1)) should be (71.5,1.9)-(56.4x22.3). Was (71.5,2.0)-(56.4x22.0). FAIL rectToString(svgText.getExtentOfChar(2)) should be (127.9,1.9)-(51.3x22.3). Was (127.9,2.0)-(51.3x22.0). FAIL rectToString(svgText.getExtentOfChar(3)) should be (179.2,1.9)-(30.8x22.3). Was (179.2,2.0)-(30.8x22.0). Test getRotationOfChar() API PASS svgText.getRotationOfChar(0).toFixed(1) is "0.0" PASS svgText.getRotationOfChar(1).toFixed(1) is "0.0" PASS svgText.getRotationOfChar(2).toFixed(1) is "0.0" PASS svgText.getRotationOfChar(3).toFixed(1) is "0.0" Test getCharNumAtPosition() API > Testing point=(0.0,10.0) PASS svgText.getCharNumAtPosition(point) is -1 > Testing point=(9.9,10.0) PASS svgText.getCharNumAtPosition(point) is -1 > Testing point=(10.1,10.0) PASS svgText.getCharNumAtPosition(point) is 0 > Testing point=(71.4,10.0) PASS svgText.getCharNumAtPosition(point) is 0 > Testing point=(71.6,10.0) PASS svgText.getCharNumAtPosition(point) is 1 > Testing point=(127.8,10.0) PASS svgText.getCharNumAtPosition(point) is 1 > Testing point=(128.0,10.0) PASS svgText.getCharNumAtPosition(point) is 2 > Testing point=(179.1,10.0) PASS svgText.getCharNumAtPosition(point) is 2 > Testing point=(179.3,10.0) PASS svgText.getCharNumAtPosition(point) is 3 > Testing point=(209.9,10.0) PASS svgText.getCharNumAtPosition(point) is 3 > Testing point=(210.1,10.0) PASS svgText.getCharNumAtPosition(point) is -1 > Testing point=(250.0,10.0) PASS svgText.getCharNumAtPosition(point) is -1 PASS successfullyParsed is true TEST COMPLETE