blob: 14f4a43842152f4d8221848e8c13c6b21cb5b5bf [file] [log] [blame]
ABC
This is a test of the simple SVGStringList API parts.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS text1.requiredFeatures.numberOfItems is 3
Test uncommon arguments for initialize()
PASS text1.requiredFeatures.initialize('30') is "30"
PASS text1.requiredFeatures.numberOfItems is 1
PASS text1.requiredFeatures.getItem(0) is "30"
PASS text1.getAttribute('requiredFeatures') is "30"
PASS text1.requiredFeatures.initialize(text1) is "[object SVGTextElement]"
PASS text1.requiredFeatures.numberOfItems is 1
PASS text1.requiredFeatures.getItem(0) is "[object SVGTextElement]"
PASS text1.getAttribute('requiredFeatures') is "[object SVGTextElement]"
PASS text1.requiredFeatures.initialize(0) is "0"
PASS text1.requiredFeatures.numberOfItems is 1
PASS text1.requiredFeatures.getItem(0) is "0"
PASS text1.getAttribute('requiredFeatures') is "0"
PASS text1.requiredFeatures.initialize('aString') is "aString"
PASS text1.requiredFeatures.numberOfItems is 1
PASS text1.requiredFeatures.getItem(0) is "aString"
PASS text1.getAttribute('requiredFeatures') is "aString"
Test uncommon arguments for getItem()
PASS text1.requiredFeatures.getItem(30) threw exception IndexSizeError: The index is not in the allowed range..
PASS text1.requiredFeatures.getItem('aString') is text1.requiredFeatures.getItem(0)
PASS text1.requiredFeatures.getItem(text1) is text1.requiredFeatures.getItem(0)
PASS text1.requiredFeatures.getItem(null) is text1.requiredFeatures.getItem(0)
Test uncommon arguments for insertItemBefore()
PASS text1.requiredFeatures.insertItemBefore(30) threw exception TypeError: Not enough arguments.
PASS text1.requiredFeatures.insertItemBefore('aString') threw exception TypeError: Not enough arguments.
PASS text1.requiredFeatures.insertItemBefore(text1) threw exception TypeError: Not enough arguments.
PASS text1.requiredFeatures.insertItemBefore(null) threw exception TypeError: Not enough arguments.
PASS text1.requiredFeatures.insertItemBefore(text1.requiredFeatures.getItem(1), 'aString') threw exception IndexSizeError: The index is not in the allowed range..
PASS text1.requiredFeatures.insertItemBefore(text1.requiredFeatures.getItem(1), text1) threw exception IndexSizeError: The index is not in the allowed range..
PASS text1.requiredFeatures.insertItemBefore(text1.requiredFeatures.getItem(1), null) threw exception IndexSizeError: The index is not in the allowed range..
PASS text1.requiredFeatures.insertItemBefore(text1.requiredFeatures.getItem(1), 0) threw exception IndexSizeError: The index is not in the allowed range..
PASS text1.requiredFeatures.insertItemBefore(30, 0) is "30"
PASS text1.requiredFeatures.numberOfItems is 2
PASS text1.requiredFeatures.getItem(0) is "30"
PASS text1.requiredFeatures.getItem(1) is "aString"
PASS text1.getAttribute('requiredFeatures') is "30 aString"
PASS text1.requiredFeatures.insertItemBefore('aString', 0) is "aString"
PASS text1.requiredFeatures.numberOfItems is 3
PASS text1.requiredFeatures.getItem(0) is "aString"
PASS text1.requiredFeatures.getItem(1) is "30"
PASS text1.requiredFeatures.getItem(2) is "aString"
PASS text1.getAttribute('requiredFeatures') is "aString 30 aString"
PASS text1.requiredFeatures.insertItemBefore(text1, 0) is "[object SVGTextElement]"
PASS text1.requiredFeatures.numberOfItems is 4
PASS text1.requiredFeatures.getItem(0) is "[object SVGTextElement]"
PASS text1.requiredFeatures.getItem(1) is "aString"
PASS text1.requiredFeatures.getItem(2) is "30"
PASS text1.requiredFeatures.getItem(3) is "aString"
PASS text1.getAttribute('requiredFeatures') is "[object SVGTextElement] aString 30 aString"
PASS text1.requiredFeatures.insertItemBefore(null, 0) is "null"
PASS text1.requiredFeatures.numberOfItems is 5
PASS text1.requiredFeatures.getItem(0) is "null"
PASS text1.requiredFeatures.getItem(1) is "[object SVGTextElement]"
PASS text1.requiredFeatures.getItem(2) is "aString"
PASS text1.requiredFeatures.getItem(3) is "30"
PASS text1.requiredFeatures.getItem(4) is "aString"
PASS text1.getAttribute('requiredFeatures') is "null [object SVGTextElement] aString 30 aString"
Set requiredFeatures='1 2 3 4' for text1
PASS text1.setAttribute('requiredFeatures', '1 2 3 4') is undefined.
PASS text1.requiredFeatures.numberOfItems is 4
PASS text1.requiredFeatures.getItem(0) is "1"
PASS text1.requiredFeatures.getItem(1) is "2"
PASS text1.requiredFeatures.getItem(2) is "3"
PASS text1.requiredFeatures.getItem(3) is "4"
PASS text1.getAttribute('requiredFeatures') is "1 2 3 4"
Test uncommon arguments for replaceItem() - part 1
PASS text1.requiredFeatures.replaceItem(30) threw exception TypeError: Not enough arguments.
PASS text1.requiredFeatures.replaceItem('aString') threw exception TypeError: Not enough arguments.
PASS text1.requiredFeatures.replaceItem(text1) threw exception TypeError: Not enough arguments.
PASS text1.requiredFeatures.replaceItem(null, 0) is "null"
PASS text1.requiredFeatures.numberOfItems is 4
PASS text1.requiredFeatures.getItem(0) is "null"
PASS text1.requiredFeatures.getItem(1) is "2"
PASS text1.requiredFeatures.getItem(2) is "3"
PASS text1.requiredFeatures.getItem(3) is "4"
PASS text1.getAttribute('requiredFeatures') is "null 2 3 4"
PASS text1.requiredFeatures.replaceItem('aString', 3) is "aString"
PASS text1.requiredFeatures.numberOfItems is 4
PASS text1.requiredFeatures.getItem(0) is "null"
PASS text1.requiredFeatures.getItem(1) is "2"
PASS text1.requiredFeatures.getItem(2) is "3"
PASS text1.requiredFeatures.getItem(3) is "aString"
PASS text1.getAttribute('requiredFeatures') is "null 2 3 aString"
PASS text1.requiredFeatures.replaceItem(text1, 2) is "[object SVGTextElement]"
PASS text1.requiredFeatures.numberOfItems is 4
PASS text1.requiredFeatures.getItem(0) is "null"
PASS text1.requiredFeatures.getItem(1) is "2"
PASS text1.requiredFeatures.getItem(2) is "[object SVGTextElement]"
PASS text1.requiredFeatures.getItem(3) is "aString"
PASS text1.getAttribute('requiredFeatures') is "null 2 [object SVGTextElement] aString"
PASS text1.requiredFeatures.replaceItem(1, 1) is "1"
PASS text1.requiredFeatures.numberOfItems is 4
PASS text1.requiredFeatures.getItem(0) is "null"
PASS text1.requiredFeatures.getItem(1) is "1"
PASS text1.requiredFeatures.getItem(2) is "[object SVGTextElement]"
PASS text1.requiredFeatures.getItem(3) is "aString"
PASS text1.getAttribute('requiredFeatures') is "null 1 [object SVGTextElement] aString"
Set requiredFeatures='1 2 3 4' for text1
PASS text1.setAttribute('requiredFeatures', '1 2 3 4') is undefined.
PASS text1.requiredFeatures.numberOfItems is 4
PASS text1.requiredFeatures.getItem(0) is "1"
PASS text1.requiredFeatures.getItem(1) is "2"
PASS text1.requiredFeatures.getItem(2) is "3"
PASS text1.requiredFeatures.getItem(3) is "4"
PASS text1.getAttribute('requiredFeatures') is "1 2 3 4"
Test uncommon arguments for replaceItem() - part 2
PASS text1.requiredFeatures.replaceItem(text1.requiredFeatures.getItem(0), 0) is "1"
PASS text1.requiredFeatures.numberOfItems is 4
PASS text1.requiredFeatures.getItem(0) is "1"
PASS text1.requiredFeatures.getItem(1) is "2"
PASS text1.requiredFeatures.getItem(2) is "3"
PASS text1.requiredFeatures.getItem(3) is "4"
PASS text1.getAttribute('requiredFeatures') is "1 2 3 4"
PASS text1.requiredFeatures.replaceItem(text1.requiredFeatures.getItem(0), 'aString') is "1"
PASS text1.requiredFeatures.numberOfItems is 4
PASS text1.requiredFeatures.getItem(0) is "1"
PASS text1.requiredFeatures.getItem(1) is "2"
PASS text1.requiredFeatures.getItem(2) is "3"
PASS text1.requiredFeatures.getItem(3) is "4"
PASS text1.getAttribute('requiredFeatures') is "1 2 3 4"
PASS text1.requiredFeatures.replaceItem(text1.requiredFeatures.getItem(0), text1) is "1"
PASS text1.requiredFeatures.numberOfItems is 4
PASS text1.requiredFeatures.getItem(0) is "1"
PASS text1.requiredFeatures.getItem(1) is "2"
PASS text1.requiredFeatures.getItem(2) is "3"
PASS text1.requiredFeatures.getItem(3) is "4"
PASS text1.getAttribute('requiredFeatures') is "1 2 3 4"
PASS text1.requiredFeatures.replaceItem(text1.requiredFeatures.getItem(0), null) is "1"
PASS text1.requiredFeatures.numberOfItems is 4
PASS text1.requiredFeatures.getItem(0) is "1"
PASS text1.requiredFeatures.getItem(1) is "2"
PASS text1.requiredFeatures.getItem(2) is "3"
PASS text1.requiredFeatures.getItem(3) is "4"
PASS text1.getAttribute('requiredFeatures') is "1 2 3 4"
Test uncommon arguments for removeItem()
PASS text1.requiredFeatures.removeItem(30) threw exception IndexSizeError: The index is not in the allowed range..
PASS text1.requiredFeatures.removeItem('aString') is "1"
PASS text1.requiredFeatures.numberOfItems is 3
PASS text1.getAttribute('requiredFeatures') is "2 3 4"
PASS text1.requiredFeatures.removeItem(text1) is "2"
PASS text1.requiredFeatures.numberOfItems is 2
PASS text1.requiredFeatures.getItem(0) is "3"
PASS text1.requiredFeatures.getItem(1) is "4"
PASS text1.getAttribute('requiredFeatures') is "3 4"
PASS text1.requiredFeatures.removeItem(null) is "3"
PASS text1.requiredFeatures.numberOfItems is 1
PASS text1.getAttribute('requiredFeatures') is "4"
PASS text1.requiredFeatures.getItem(0) is "4"
Test uncommon arguments for appendItem()
PASS text1.requiredFeatures.appendItem(30) is "30"
PASS text1.requiredFeatures.numberOfItems is 2
PASS text1.requiredFeatures.getItem(0) is "4"
PASS text1.requiredFeatures.getItem(1) is "30"
PASS text1.getAttribute('requiredFeatures') is "4 30"
PASS text1.requiredFeatures.appendItem('aString') is "aString"
PASS text1.requiredFeatures.numberOfItems is 3
PASS text1.requiredFeatures.getItem(0) is "4"
PASS text1.requiredFeatures.getItem(1) is "30"
PASS text1.requiredFeatures.getItem(2) is "aString"
PASS text1.getAttribute('requiredFeatures') is "4 30 aString"
PASS text1.requiredFeatures.appendItem(text1) is "[object SVGTextElement]"
PASS text1.requiredFeatures.numberOfItems is 4
PASS text1.requiredFeatures.getItem(0) is "4"
PASS text1.requiredFeatures.getItem(1) is "30"
PASS text1.requiredFeatures.getItem(2) is "aString"
PASS text1.requiredFeatures.getItem(3) is "[object SVGTextElement]"
PASS text1.getAttribute('requiredFeatures') is "4 30 aString [object SVGTextElement]"
PASS text1.requiredFeatures.appendItem(null) is "null"
PASS text1.requiredFeatures.numberOfItems is 5
PASS text1.requiredFeatures.getItem(0) is "4"
PASS text1.requiredFeatures.getItem(1) is "30"
PASS text1.requiredFeatures.getItem(2) is "aString"
PASS text1.requiredFeatures.getItem(3) is "[object SVGTextElement]"
PASS text1.requiredFeatures.getItem(4) is "null"
PASS text1.getAttribute('requiredFeatures') is "4 30 aString [object SVGTextElement] null"
clear() requiredFeatures list so text on top shows up
PASS text1.requiredFeatures.clear() is undefined.
PASS successfullyParsed is true
TEST COMPLETE