| This is a test of the simple SVGTransformList API parts. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| PASS circle1.transform.baseVal != circle1.transform.animVal is true |
| PASS circle1.transform.baseVal.numberOfItems is 2 |
| PASS circle1.transform.animVal.numberOfItems is 2 |
| PASS dumpTransform(circle1.transform.baseVal.getItem(0)) is "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(1)) is "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]" |
| |
| Test uncommon arguments for initialize() |
| PASS circle1.transform.baseVal.initialize(30) threw exception TypeError: Argument 1 ('item') to SVGTransformList.initialize must be an instance of SVGTransform. |
| PASS circle1.transform.baseVal.initialize('aString') threw exception TypeError: Argument 1 ('item') to SVGTransformList.initialize must be an instance of SVGTransform. |
| PASS circle1.transform.baseVal.initialize(circle1) threw exception TypeError: Argument 1 ('item') to SVGTransformList.initialize must be an instance of SVGTransform. |
| PASS circle1.transform.baseVal.initialize(null) threw exception TypeError: Argument 1 ('item') to SVGTransformList.initialize must be an instance of SVGTransform. |
| |
| Test uncommon arguments for getItem() |
| PASS circle1.transform.baseVal.getItem(30) threw exception IndexSizeError: The index is not in the allowed range.. |
| PASS circle1.transform.baseVal.getItem('aString') is circle1.transform.baseVal.getItem(0) |
| PASS circle1.transform.baseVal.getItem(circle1) is circle1.transform.baseVal.getItem(0) |
| PASS circle1.transform.baseVal.getItem(null) is circle1.transform.baseVal.getItem(0) |
| |
| Test uncommon arguments for insertItemBefore() |
| PASS circle1.transform.baseVal.insertItemBefore(30) threw exception TypeError: Not enough arguments. |
| PASS circle1.transform.baseVal.insertItemBefore('aString') threw exception TypeError: Not enough arguments. |
| PASS circle1.transform.baseVal.insertItemBefore(circle1) threw exception TypeError: Not enough arguments. |
| PASS circle1.transform.baseVal.insertItemBefore(null) threw exception TypeError: Not enough arguments. |
| PASS circle1.transform.baseVal.insertItemBefore(circle1.transform.baseVal.getItem(1), 'aString') is circle1.transform.baseVal.getItem(0) |
| PASS dumpTransform(circle1.transform.baseVal.removeItem(2)) is "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]" |
| PASS circle1.transform.baseVal.numberOfItems is 2 |
| PASS dumpTransform(circle1.transform.baseVal.getItem(0)) is "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(1)) is "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]" |
| PASS circle1.getAttribute('transform') is "translate(10 10) scale(2 2)" |
| PASS circle1.transform.baseVal.insertItemBefore(circle1.transform.baseVal.getItem(1), circle1) is circle1.transform.baseVal.getItem(0) |
| PASS dumpTransform(circle1.transform.baseVal.removeItem(2)) is "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]" |
| PASS circle1.transform.baseVal.numberOfItems is 2 |
| PASS dumpTransform(circle1.transform.baseVal.getItem(0)) is "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(1)) is "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]" |
| PASS circle1.getAttribute('transform') is "scale(2 2) translate(10 10)" |
| PASS circle1.transform.baseVal.insertItemBefore(circle1.transform.baseVal.getItem(1), null) is circle1.transform.baseVal.getItem(0) |
| PASS dumpTransform(circle1.transform.baseVal.removeItem(2)) is "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]" |
| PASS circle1.transform.baseVal.numberOfItems is 2 |
| PASS dumpTransform(circle1.transform.baseVal.getItem(0)) is "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(1)) is "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]" |
| PASS circle1.getAttribute('transform') is "translate(10 10) scale(2 2)" |
| PASS circle1.transform.baseVal.insertItemBefore(circle1.transform.baseVal.getItem(1), 0) is circle1.transform.baseVal.getItem(0) |
| PASS dumpTransform(circle1.transform.baseVal.removeItem(2)) is "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]" |
| PASS circle1.transform.baseVal.numberOfItems is 2 |
| PASS dumpTransform(circle1.transform.baseVal.getItem(0)) is "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(1)) is "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]" |
| PASS circle1.getAttribute('transform') is "scale(2 2) translate(10 10)" |
| PASS circle1.transform.baseVal.insertItemBefore(30, 0) threw exception TypeError: Argument 1 ('item') to SVGTransformList.insertItemBefore must be an instance of SVGTransform. |
| PASS circle1.transform.baseVal.insertItemBefore('aString', 0) threw exception TypeError: Argument 1 ('item') to SVGTransformList.insertItemBefore must be an instance of SVGTransform. |
| PASS circle1.transform.baseVal.insertItemBefore(circle1, 0) threw exception TypeError: Argument 1 ('item') to SVGTransformList.insertItemBefore must be an instance of SVGTransform. |
| PASS circle1.transform.baseVal.insertItemBefore(null, 0) threw exception TypeError: Argument 1 ('item') to SVGTransformList.insertItemBefore must be an instance of SVGTransform. |
| |
| Test overlapping edge cases for removeItem() |
| PASS circle1.setAttribute('transform', 'scale(2 2) translate(10 10)') is undefined. |
| PASS dumpTransform(circle1.transform.baseVal.getItem(1)) is "type=SVG_TRANSFORM_MATRIX matrix=[1.0 0.0 0.0 1.0 20.0 20.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(1)) is "type=SVG_TRANSFORM_MATRIX matrix=[1.0 0.0 0.0 1.0 20.0 20.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(1)) is "type=SVG_TRANSFORM_MATRIX matrix=[1.0 0.0 0.0 1.0 40.0 40.0]" |
| PASS circle1.transform.baseVal.numberOfItems is 0 |
| |
| Set transform='rotate(90) scale(2 2) translate(10 10) skewX(45)' for circle1 |
| PASS circle1.setAttribute('transform', 'rotate(90) scale(2 2) translate(10 10) skewX(45)') is undefined. |
| PASS circle1.transform.baseVal.numberOfItems is 4 |
| PASS dumpTransform(circle1.transform.baseVal.getItem(0)) is "type=SVG_TRANSFORM_ROTATE matrix=[0.0 1.0 -1.0 0.0 0.0 0.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(1)) is "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(2)) is "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(3)) is "type=SVG_TRANSFORM_SKEWX matrix=[1.0 0.0 1.0 1.0 0.0 0.0]" |
| PASS circle1.getAttribute('transform') is "rotate(90) scale(2 2) translate(10 10) skewX(45)" |
| |
| Test uncommon arguments for replaceItem() |
| PASS circle1.transform.baseVal.replaceItem(30) threw exception TypeError: Not enough arguments. |
| PASS circle1.transform.baseVal.replaceItem('aString') threw exception TypeError: Not enough arguments. |
| PASS circle1.transform.baseVal.replaceItem(circle1) threw exception TypeError: Not enough arguments. |
| PASS circle1.transform.baseVal.replaceItem(null) threw exception TypeError: Not enough arguments. |
| PASS circle1.transform.baseVal.replaceItem(30, 0) threw exception TypeError: Argument 1 ('item') to SVGTransformList.replaceItem must be an instance of SVGTransform. |
| PASS circle1.transform.baseVal.replaceItem('aString', 0) threw exception TypeError: Argument 1 ('item') to SVGTransformList.replaceItem must be an instance of SVGTransform. |
| PASS circle1.transform.baseVal.replaceItem(circle1, 0) threw exception TypeError: Argument 1 ('item') to SVGTransformList.replaceItem must be an instance of SVGTransform. |
| PASS circle1.transform.baseVal.replaceItem(null, 0) threw exception TypeError: Argument 1 ('item') to SVGTransformList.replaceItem must be an instance of SVGTransform. |
| PASS circle1.transform.baseVal.replaceItem(circle1.transform.baseVal.getItem(0), 0) is circle1.transform.baseVal.getItem(0) |
| PASS circle1.transform.baseVal.numberOfItems is 4 |
| PASS dumpTransform(circle1.transform.baseVal.getItem(0)) is "type=SVG_TRANSFORM_ROTATE matrix=[0.0 1.0 -1.0 0.0 0.0 0.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(1)) is "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(2)) is "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(3)) is "type=SVG_TRANSFORM_SKEWX matrix=[1.0 0.0 1.0 1.0 0.0 0.0]" |
| PASS circle1.getAttribute('transform') is "rotate(90) scale(2 2) translate(10 10) skewX(45)" |
| PASS circle1.transform.baseVal.replaceItem(circle1.transform.baseVal.getItem(0), 'aString') is circle1.transform.baseVal.getItem(0) |
| PASS circle1.transform.baseVal.numberOfItems is 4 |
| PASS dumpTransform(circle1.transform.baseVal.getItem(0)) is "type=SVG_TRANSFORM_ROTATE matrix=[0.0 1.0 -1.0 0.0 0.0 0.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(1)) is "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(2)) is "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(3)) is "type=SVG_TRANSFORM_SKEWX matrix=[1.0 0.0 1.0 1.0 0.0 0.0]" |
| PASS circle1.getAttribute('transform') is "rotate(90) scale(2 2) translate(10 10) skewX(45)" |
| PASS circle1.transform.baseVal.replaceItem(circle1.transform.baseVal.getItem(0), circle1) is circle1.transform.baseVal.getItem(0) |
| PASS circle1.transform.baseVal.numberOfItems is 4 |
| PASS dumpTransform(circle1.transform.baseVal.getItem(0)) is "type=SVG_TRANSFORM_ROTATE matrix=[0.0 1.0 -1.0 0.0 0.0 0.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(1)) is "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(2)) is "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(3)) is "type=SVG_TRANSFORM_SKEWX matrix=[1.0 0.0 1.0 1.0 0.0 0.0]" |
| PASS circle1.getAttribute('transform') is "rotate(90) scale(2 2) translate(10 10) skewX(45)" |
| PASS circle1.transform.baseVal.replaceItem(circle1.transform.baseVal.getItem(0), null) is circle1.transform.baseVal.getItem(0) |
| PASS circle1.transform.baseVal.numberOfItems is 4 |
| PASS circle1.getAttribute('transform') is "rotate(90) scale(2 2) translate(10 10) skewX(45)" |
| |
| Set transform='rotate(90) scale(2 2) translate(10 10) skewX(45)' for circle1 |
| PASS circle1.setAttribute('transform', 'rotate(90) scale(2 2) translate(10 10) skewX(45)') is undefined. |
| |
| Test uncommon arguments for removeItem() |
| PASS circle1.transform.baseVal.removeItem(30) threw exception IndexSizeError: The index is not in the allowed range.. |
| PASS dumpTransform(circle1.transform.baseVal.removeItem(0)) is "type=SVG_TRANSFORM_ROTATE matrix=[0.0 1.0 -1.0 0.0 0.0 0.0]" |
| PASS circle1.transform.baseVal.numberOfItems is 3 |
| PASS dumpTransform(circle1.transform.baseVal.getItem(0)) is "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(1)) is "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(2)) is "type=SVG_TRANSFORM_SKEWX matrix=[1.0 0.0 1.0 1.0 0.0 0.0]" |
| PASS circle1.getAttribute('transform') is "scale(2 2) translate(10 10) skewX(45)" |
| PASS dumpTransform(circle1.transform.baseVal.removeItem('aString')) is "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]" |
| PASS circle1.transform.baseVal.numberOfItems is 2 |
| PASS dumpTransform(circle1.transform.baseVal.getItem(0)) is "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]" |
| PASS dumpTransform(circle1.transform.baseVal.getItem(1)) is "type=SVG_TRANSFORM_SKEWX matrix=[1.0 0.0 1.0 1.0 0.0 0.0]" |
| PASS circle1.getAttribute('transform') is "translate(10 10) skewX(45)" |
| PASS dumpTransform(circle1.transform.baseVal.removeItem(circle1)) is "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]" |
| PASS circle1.transform.baseVal.numberOfItems is 1 |
| PASS dumpTransform(circle1.transform.baseVal.getItem(0)) is "type=SVG_TRANSFORM_SKEWX matrix=[1.0 0.0 1.0 1.0 0.0 0.0]" |
| PASS circle1.getAttribute('transform') is "skewX(45)" |
| |
| Test uncommon arguments for appendItem() |
| PASS circle1.transform.baseVal.appendItem(30) threw exception TypeError: Argument 1 ('item') to SVGTransformList.appendItem must be an instance of SVGTransform. |
| PASS circle1.transform.baseVal.appendItem('aString') threw exception TypeError: Argument 1 ('item') to SVGTransformList.appendItem must be an instance of SVGTransform. |
| PASS circle1.transform.baseVal.appendItem(circle1) threw exception TypeError: Argument 1 ('item') to SVGTransformList.appendItem must be an instance of SVGTransform. |
| PASS circle1.transform.baseVal.appendItem(null) threw exception TypeError: Argument 1 ('item') to SVGTransformList.appendItem must be an instance of SVGTransform. |
| |
| Testing animVal clear throws |
| PASS circle1.transform.animVal.clear() threw exception NoModificationAllowedError: The object can not be modified.. |
| PASS circle1.transform.baseVal.clear() is undefined. |
| |
| Creating new SVGTransform, with 45 deg rotation about x=50, y=100 and append it to the transform list |
| PASS dumpTransform(transform = svg.createSVGTransform()) is "type=SVG_TRANSFORM_MATRIX matrix=[1.0 0.0 0.0 1.0 0.0 0.0]" |
| PASS transform.setRotate(45, 50, 100) is undefined. |
| PASS dumpTransform(circle1.transform.baseVal.appendItem(transform)) is "type=SVG_TRANSFORM_ROTATE matrix=[0.7 0.7 -0.7 0.7 85.4 -6.1]" |
| PASS circle1.transform.baseVal.numberOfItems is 1 |
| PASS dumpTransform(circle1.transform.baseVal.getItem(0)) is "type=SVG_TRANSFORM_ROTATE matrix=[0.7 0.7 -0.7 0.7 85.4 -6.1]" |
| PASS circle1.getAttribute('transform') is "rotate(45 50 100)" |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |