176 lines
10 KiB
Plaintext
176 lines
10 KiB
Plaintext
ABC
|
|
This is a test of the simple SVGLengthList API parts.
|
|
|
|
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
|
|
|
|
|
|
PASS text1.x.baseVal != text1.x.animVal is true
|
|
PASS text1.x.baseVal.numberOfItems is 3
|
|
PASS text1.x.animVal.numberOfItems is 3
|
|
PASS text1.x.baseVal.getItem(0).value is 500
|
|
PASS text1.x.baseVal.getItem(1).value is 1000
|
|
PASS text1.x.baseVal.getItem(2).value is 1500
|
|
|
|
Test uncommon arguments for initialize()
|
|
PASS text1.x.baseVal.initialize(30) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.initialize must be an instance of SVGLength.
|
|
PASS text1.x.baseVal.initialize('aString') threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.initialize must be an instance of SVGLength.
|
|
PASS text1.x.baseVal.initialize(text1) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.initialize must be an instance of SVGLength.
|
|
PASS text1.x.baseVal.initialize(null) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.initialize must be an instance of SVGLength.
|
|
|
|
Test uncommon arguments for getItem()
|
|
PASS text1.x.baseVal.getItem(30) threw exception IndexSizeError: The index is not in the allowed range..
|
|
PASS text1.x.baseVal.getItem('aString') is text1.x.baseVal.getItem(0)
|
|
PASS text1.x.baseVal.getItem(text1) is text1.x.baseVal.getItem(0)
|
|
PASS text1.x.baseVal.getItem(null) is text1.x.baseVal.getItem(0)
|
|
|
|
Test uncommon arguments for insertItemBefore()
|
|
PASS text1.x.baseVal.insertItemBefore(30) threw exception TypeError: Not enough arguments.
|
|
PASS text1.x.baseVal.insertItemBefore('aString') threw exception TypeError: Not enough arguments.
|
|
PASS text1.x.baseVal.insertItemBefore(text1) threw exception TypeError: Not enough arguments.
|
|
PASS text1.x.baseVal.insertItemBefore(null) threw exception TypeError: Not enough arguments.
|
|
PASS text1.x.baseVal.insertItemBefore(text1.x.baseVal.getItem(1), 'aString') is text1.x.baseVal.getItem(0)
|
|
PASS text1.x.baseVal.removeItem(2).toString() is "[object SVGLength]"
|
|
PASS text1.x.baseVal.numberOfItems is 3
|
|
PASS text1.x.baseVal.getItem(0).value is 1000
|
|
PASS text1.x.baseVal.getItem(1).value is 500
|
|
PASS text1.x.baseVal.getItem(2).value is 1500
|
|
PASS text1.getAttribute('x') is "1000 500 1500"
|
|
PASS text1.x.baseVal.insertItemBefore(text1.x.baseVal.getItem(1), text1) is text1.x.baseVal.getItem(0)
|
|
PASS text1.x.baseVal.removeItem(2).toString() is "[object SVGLength]"
|
|
PASS text1.x.baseVal.numberOfItems is 3
|
|
PASS text1.x.baseVal.getItem(0).value is 500
|
|
PASS text1.x.baseVal.getItem(1).value is 1000
|
|
PASS text1.x.baseVal.getItem(2).value is 1500
|
|
PASS text1.getAttribute('x') is "500 1000 1500"
|
|
PASS text1.x.baseVal.insertItemBefore(text1.x.baseVal.getItem(1), null) is text1.x.baseVal.getItem(0)
|
|
PASS text1.x.baseVal.removeItem(2).toString() is "[object SVGLength]"
|
|
PASS text1.x.baseVal.numberOfItems is 3
|
|
PASS text1.x.baseVal.getItem(0).value is 1000
|
|
PASS text1.x.baseVal.getItem(1).value is 500
|
|
PASS text1.x.baseVal.getItem(2).value is 1500
|
|
PASS text1.getAttribute('x') is "1000 500 1500"
|
|
PASS text1.x.baseVal.insertItemBefore(text1.x.baseVal.getItem(1), 0) is text1.x.baseVal.getItem(0)
|
|
PASS text1.x.baseVal.removeItem(2).toString() is "[object SVGLength]"
|
|
PASS text1.x.baseVal.numberOfItems is 3
|
|
PASS text1.x.baseVal.getItem(0).value is 500
|
|
PASS text1.x.baseVal.getItem(1).value is 1000
|
|
PASS text1.x.baseVal.getItem(2).value is 1500
|
|
PASS text1.getAttribute('x') is "500 1000 1500"
|
|
PASS text1.x.baseVal.insertItemBefore(30, 0) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.insertItemBefore must be an instance of SVGLength.
|
|
PASS text1.x.baseVal.insertItemBefore('aString', 0) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.insertItemBefore must be an instance of SVGLength.
|
|
PASS text1.x.baseVal.insertItemBefore(text1, 0) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.insertItemBefore must be an instance of SVGLength.
|
|
PASS text1.x.baseVal.insertItemBefore(null, 0) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.insertItemBefore must be an instance of SVGLength.
|
|
|
|
Set x='1 2 3 4' for text1
|
|
PASS text1.setAttribute('x', '1 2 3 4') is undefined.
|
|
|
|
Test edge cases for insertItemBefore()
|
|
PASS text1.x.baseVal.insertItemBefore(text1.x.baseVal.getItem(3), 3) is text1.x.baseVal.getItem(3)
|
|
PASS text1.x.baseVal.removeItem(4).toString() is "[object SVGLength]"
|
|
PASS text1.getAttribute('x') is "1 2 3 4"
|
|
PASS text1.x.baseVal.insertItemBefore(text1.x.baseVal.getItem(1), 5) is text1.x.baseVal.getItem(4)
|
|
PASS text1.x.baseVal.removeItem(1).toString() is "[object SVGLength]"
|
|
PASS text1.getAttribute('x') is "1 3 4 2"
|
|
PASS text1.x.baseVal.insertItemBefore(text1.x.baseVal.getItem(1), 0) is text1.x.baseVal.getItem(0)
|
|
PASS text1.x.baseVal.removeItem(2).toString() is "[object SVGLength]"
|
|
PASS text1.getAttribute('x') is "3 1 4 2"
|
|
|
|
Set x='1 2 3 4' for text1
|
|
PASS text1.setAttribute('x', '1 2 3 4') is undefined.
|
|
PASS text1.x.baseVal.numberOfItems is 4
|
|
PASS text1.x.baseVal.getItem(0).value is 1
|
|
PASS text1.x.baseVal.getItem(1).value is 2
|
|
PASS text1.x.baseVal.getItem(2).value is 3
|
|
PASS text1.x.baseVal.getItem(3).value is 4
|
|
PASS text1.getAttribute('x') is "1 2 3 4"
|
|
|
|
Test uncommon arguments for replaceItem()
|
|
PASS text1.x.baseVal.replaceItem(30) threw exception TypeError: Not enough arguments.
|
|
PASS text1.x.baseVal.replaceItem('aString') threw exception TypeError: Not enough arguments.
|
|
PASS text1.x.baseVal.replaceItem(text1) threw exception TypeError: Not enough arguments.
|
|
PASS text1.x.baseVal.replaceItem(null) threw exception TypeError: Not enough arguments.
|
|
PASS text1.x.baseVal.replaceItem(30, 0) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.replaceItem must be an instance of SVGLength.
|
|
PASS text1.x.baseVal.replaceItem('aString', 0) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.replaceItem must be an instance of SVGLength.
|
|
PASS text1.x.baseVal.replaceItem(text1, 0) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.replaceItem must be an instance of SVGLength.
|
|
PASS text1.x.baseVal.replaceItem(null, 0) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.replaceItem must be an instance of SVGLength.
|
|
PASS text1.x.baseVal.replaceItem(text1.x.baseVal.getItem(0), 0) is text1.x.baseVal.getItem(0)
|
|
PASS text1.x.baseVal.numberOfItems is 4
|
|
PASS text1.x.baseVal.getItem(0).value is 1
|
|
PASS text1.x.baseVal.getItem(1).value is 2
|
|
PASS text1.x.baseVal.getItem(2).value is 3
|
|
PASS text1.x.baseVal.getItem(3).value is 4
|
|
PASS text1.getAttribute('x') is "1 2 3 4"
|
|
PASS text1.x.baseVal.replaceItem(text1.x.baseVal.getItem(0), 'aString') is text1.x.baseVal.getItem(0)
|
|
PASS text1.x.baseVal.numberOfItems is 4
|
|
PASS text1.x.baseVal.getItem(0).value is 1
|
|
PASS text1.x.baseVal.getItem(1).value is 2
|
|
PASS text1.x.baseVal.getItem(2).value is 3
|
|
PASS text1.x.baseVal.getItem(3).value is 4
|
|
PASS text1.getAttribute('x') is "1 2 3 4"
|
|
PASS text1.x.baseVal.replaceItem(text1.x.baseVal.getItem(0), text1) is text1.x.baseVal.getItem(0)
|
|
PASS text1.x.baseVal.numberOfItems is 4
|
|
PASS text1.getAttribute('x') is "1 2 3 4"
|
|
|
|
Set x='1 2 3 4' for text1
|
|
PASS text1.setAttribute('x', '1 2 3 4') is undefined.
|
|
|
|
Test edge cases for replaceItem()
|
|
PASS text1.x.baseVal.replaceItem(text1.x.baseVal.getItem(3), 3) is text1.x.baseVal.getItem(3)
|
|
PASS text1.x.baseVal.numberOfItems is 4
|
|
PASS text1.getAttribute('x') is "1 2 3 4"
|
|
PASS text1.x.baseVal.replaceItem(text1.x.baseVal.getItem(1), 3) is text1.x.baseVal.getItem(3)
|
|
PASS text1.x.baseVal.removeItem(1).toString() is "[object SVGLength]"
|
|
PASS text1.x.baseVal.numberOfItems is 3
|
|
PASS text1.getAttribute('x') is "1 3 2"
|
|
PASS text1.x.baseVal.replaceItem(text1.x.baseVal.getItem(3), 4) threw exception IndexSizeError: The index is not in the allowed range..
|
|
|
|
Set x='1 2 3 4' for text1
|
|
PASS text1.setAttribute('x', '1 2 3 4') is undefined.
|
|
|
|
Test overlapping edge cases for replaceItem()
|
|
PASS text1.x.baseVal.replaceItem(text1.x.baseVal.getItem(0), 3) is text1.x.baseVal.getItem(3)
|
|
PASS text1.x.baseVal.removeItem(0).toString() is "[object SVGLength]"
|
|
PASS text1.x.baseVal.numberOfItems is 3
|
|
PASS text1.x.baseVal.getItem(2).value is 2
|
|
PASS text1.x.baseVal.replaceItem(text1.x.baseVal.getItem(0), 2) is text1.x.baseVal.getItem(2)
|
|
PASS text1.x.baseVal.removeItem(0).toString() is "[object SVGLength]"
|
|
PASS text1.x.baseVal.numberOfItems is 2
|
|
PASS text1.x.baseVal.getItem(1).value is 4
|
|
PASS text1.x.baseVal.replaceItem(text1.x.baseVal.getItem(0), 1) is text1.x.baseVal.getItem(1)
|
|
PASS text1.x.baseVal.removeItem(1).toString() is "[object SVGLength]"
|
|
PASS text1.x.baseVal.numberOfItems is 1
|
|
PASS text1.x.baseVal.getItem(0).value is 6
|
|
PASS text1.x.baseVal.replaceItem(text1.x.baseVal.getItem(0), 0) is text1.x.baseVal.getItem(0)
|
|
PASS text1.x.baseVal.numberOfItems is 1
|
|
|
|
Set x='1 2 3 4' for text1
|
|
PASS text1.setAttribute('x', '1 2 3 4') is undefined.
|
|
|
|
Test uncommon arguments for removeItem()
|
|
PASS text1.x.baseVal.removeItem(30) threw exception IndexSizeError: The index is not in the allowed range..
|
|
PASS text1.x.baseVal.removeItem(0).value is 1
|
|
PASS text1.x.baseVal.numberOfItems is 3
|
|
PASS text1.x.baseVal.getItem(0).value is 2
|
|
PASS text1.x.baseVal.getItem(1).value is 3
|
|
PASS text1.x.baseVal.getItem(2).value is 4
|
|
PASS text1.getAttribute('x') is "2 3 4"
|
|
PASS text1.x.baseVal.removeItem(text1).value is 2
|
|
PASS text1.x.baseVal.numberOfItems is 2
|
|
PASS text1.x.baseVal.getItem(0).value is 3
|
|
PASS text1.x.baseVal.getItem(1).value is 4
|
|
PASS text1.getAttribute('x') is "3 4"
|
|
|
|
Test uncommon arguments for appendItem()
|
|
PASS text1.x.baseVal.appendItem(30) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.appendItem must be an instance of SVGLength.
|
|
PASS text1.x.baseVal.appendItem('aString') threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.appendItem must be an instance of SVGLength.
|
|
PASS text1.x.baseVal.appendItem(text1) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.appendItem must be an instance of SVGLength.
|
|
PASS text1.x.baseVal.appendItem(null) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.appendItem must be an instance of SVGLength.
|
|
|
|
Testing animVal clear throws
|
|
PASS text1.x.animVal.clear() threw exception NoModificationAllowedError: The object can not be modified..
|
|
PASS text1.x.baseVal.clear() is undefined.
|
|
PASS successfullyParsed is true
|
|
|
|
TEST COMPLETE
|
|
|