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 FAIL lengthToString(svgText.getSubStringLength(0, 1)) should be 62.8. Was 61.5. FAIL lengthToString(svgText.getSubStringLength(0, 2)) should be 108.6. Was 117.9. FAIL lengthToString(svgText.getSubStringLength(0, 3)) should be 160.0. Was 169.2. FAIL lengthToString(svgText.getSubStringLength(0, 4)) should be 188.6. Was 200.0. FAIL lengthToString(svgText.getSubStringLength(1, 1)) should be 57.2. Was 56.4. FAIL lengthToString(svgText.getSubStringLength(1, 2)) should be 108.6. Was 107.7. FAIL lengthToString(svgText.getSubStringLength(1, 3)) should be 137.2. Was 138.5. FAIL lengthToString(svgText.getSubStringLength(2, 1)) should be 51.4. Was 51.3. FAIL lengthToString(svgText.getSubStringLength(2, 2)) should be 80.0. Was 82.1. FAIL lengthToString(svgText.getSubStringLength(3, 1)) should be 28.6. Was 30.8. Test getStartPositionOfChar() API PASS pointToString(svgText.getStartPositionOfChar(0)) is "(10.0,20.0)" FAIL pointToString(svgText.getStartPositionOfChar(1)) should be (72.8,20.0). Was (71.5,20.0). FAIL pointToString(svgText.getStartPositionOfChar(2)) should be (118.6,20.0). Was (127.9,20.0). FAIL pointToString(svgText.getStartPositionOfChar(3)) should be (170.0,20.0). Was (179.2,20.0). Test getEndPositionOfChar() API FAIL pointToString(svgText.getEndPositionOfChar(0)) should be (72.8,20.0). Was (71.5,20.0). FAIL pointToString(svgText.getEndPositionOfChar(1)) should be (118.6,20.0). Was (127.9,20.0). FAIL pointToString(svgText.getEndPositionOfChar(2)) should be (170.0,20.0). Was (179.2,20.0). FAIL pointToString(svgText.getEndPositionOfChar(3)) should be (198.6,20.0). Was (210.0,20.0). Test getExtentOfChar() API FAIL rectToString(svgText.getExtentOfChar(0)) should be (10.0,1.9)-(62.8x22.3). Was (10.0,2.0)-(61.5x22.0). FAIL rectToString(svgText.getExtentOfChar(1)) should be (72.8,1.9)-(57.2x22.3). Was (71.5,2.0)-(56.4x22.0). FAIL rectToString(svgText.getExtentOfChar(2)) should be (118.6,1.9)-(51.4x22.3). Was (127.9,2.0)-(51.3x22.0). FAIL rectToString(svgText.getExtentOfChar(3)) should be (170.0,1.9)-(28.6x22.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) FAIL svgText.getCharNumAtPosition(point) should be 0. Was 1. > Testing point=(127.8,10.0) PASS svgText.getCharNumAtPosition(point) is 1 > Testing point=(128.0,10.0) FAIL svgText.getCharNumAtPosition(point) should be 1. Was 2. > Testing point=(179.1,10.0) FAIL svgText.getCharNumAtPosition(point) should be 3. Was 2. > Testing point=(179.3,10.0) PASS svgText.getCharNumAtPosition(point) is 3 > Testing point=(209.9,10.0) FAIL svgText.getCharNumAtPosition(point) should be -1. Was 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