| OLD | NEW |
| (Empty) |
| 1 ABC | |
| 2 ABC | |
| 3 ABC | |
| 4 ABC | |
| 5 ABC | |
| 6 This is a test of the SVGLengthList::initialize() API. | |
| 7 | |
| 8 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | |
| 9 | |
| 10 | |
| 11 Check initial list state of text1 | |
| 12 PASS text1.x.baseVal.numberOfItems is 3 | |
| 13 PASS text1.x.baseVal.getItem(0).value is 500 | |
| 14 PASS text1.x.baseVal.getItem(1).value is 1000 | |
| 15 PASS text1.x.baseVal.getItem(2).value is 1500 | |
| 16 PASS text1.x.baseVal.getItem(3) threw exception IndexSizeError: Failed to execut
e 'getItem' on 'SVGLengthList': The index provided (3) is greater than or equal
to the maximum bound (3).. | |
| 17 | |
| 18 Check initial list state of text2 | |
| 19 PASS text2.x.baseVal.numberOfItems is 2 | |
| 20 PASS text2.x.baseVal.getItem(0).value is 50 | |
| 21 PASS text2.x.baseVal.getItem(1).value is 500 | |
| 22 PASS text2.x.baseVal.getItem(2) threw exception IndexSizeError: Failed to execut
e 'getItem' on 'SVGLengthList': The index provided (2) is greater than or equal
to the maximum bound (2).. | |
| 23 | |
| 24 Check initial list state of text3 | |
| 25 PASS text3.x.baseVal.numberOfItems is 3 | |
| 26 PASS text3.x.baseVal.getItem(0).value is 50 | |
| 27 PASS text3.x.baseVal.getItem(1).value is 500 | |
| 28 PASS text3.x.baseVal.getItem(2).value is 50 | |
| 29 PASS text3.x.baseVal.getItem(3) threw exception IndexSizeError: Failed to execut
e 'getItem' on 'SVGLengthList': The index provided (3) is greater than or equal
to the maximum bound (3).. | |
| 30 | |
| 31 Check initial list state of text4 | |
| 32 PASS text4.x.baseVal.numberOfItems is 1 | |
| 33 PASS text4.x.baseVal.getItem(0).value is 500 | |
| 34 PASS text4.x.baseVal.getItem(1) threw exception IndexSizeError: Failed to execut
e 'getItem' on 'SVGLengthList': The index provided (1) is greater than or equal
to the maximum bound (1).. | |
| 35 | |
| 36 Create a new SVGLength object, that will be the only x coordinate in the first t
ext element. | |
| 37 PASS newLength.value is 50 | |
| 38 | |
| 39 Initialize SVGLengthList with 'newLength' | |
| 40 PASS text1.x.baseVal.initialize(newLength) is newLength | |
| 41 PASS text1.x.baseVal.getItem(0) is newLength | |
| 42 | |
| 43 Take the second x item '500' of the second text element, store it in 'itemInAnot
herList' change it to '50' | |
| 44 PASS text2.x.baseVal.getItem(1).value is 500 | |
| 45 PASS text2.x.baseVal.getItem(1).value is 50 | |
| 46 | |
| 47 Override the third text elements x list with the item x=50 from the second text
element, where it should not be removed afterwards | |
| 48 PASS text3.x.baseVal.initialize(itemInAnotherList) is itemInAnotherList | |
| 49 PASS text3.x.baseVal.getItem(0).value is 50 | |
| 50 PASS text2.x.baseVal.getItem(0).value is 50 | |
| 51 PASS text2.x.baseVal.getItem(1) did not throw exception. | |
| 52 | |
| 53 Assure that the 'itemInAnotherList' item is still live anymore, set value to 999
then back to 50 | |
| 54 PASS itemInAnotherList.value = 999; is 999 | |
| 55 PASS itemInAnotherList.value is 999 | |
| 56 PASS text3.x.baseVal.getItem(0).value is 50 | |
| 57 PASS itemInAnotherList.value = 50; is 50 | |
| 58 PASS itemInAnotherList.value is 50 | |
| 59 PASS text3.x.baseVal.getItem(0).value is 50 | |
| 60 | |
| 61 Copy item from text3 to text4 | |
| 62 PASS text4.x.baseVal.initialize(text3.x.baseVal.getItem(0)) is itemInAnotherList | |
| 63 PASS text4.x.baseVal.getItem(0).value is 50 | |
| 64 PASS text3.x.baseVal.getItem(0) did not throw exception. | |
| 65 | |
| 66 Initialize text2 using setAttribute('x', '50') | |
| 67 PASS text2.x.baseVal.getItem(0).value is 50 | |
| 68 | |
| 69 Final check whether the lists all look like expected | |
| 70 PASS text1.x.baseVal.getItem(0).value is 50 | |
| 71 PASS text2.x.baseVal.getItem(0).value is 50 | |
| 72 PASS text3.x.baseVal.getItem(0).value is 50 | |
| 73 PASS text4.x.baseVal.getItem(0).value is 50 | |
| 74 PASS text1.x.baseVal.numberOfItems is 1 | |
| 75 PASS text2.x.baseVal.numberOfItems is 1 | |
| 76 PASS text3.x.baseVal.numberOfItems is 1 | |
| 77 PASS text4.x.baseVal.numberOfItems is 1 | |
| 78 PASS text1.x.baseVal.getItem(1) threw exception IndexSizeError: Failed to execut
e 'getItem' on 'SVGLengthList': The index provided (1) is greater than or equal
to the maximum bound (1).. | |
| 79 PASS text2.x.baseVal.getItem(1) threw exception IndexSizeError: Failed to execut
e 'getItem' on 'SVGLengthList': The index provided (1) is greater than or equal
to the maximum bound (1).. | |
| 80 PASS text3.x.baseVal.getItem(1) threw exception IndexSizeError: Failed to execut
e 'getItem' on 'SVGLengthList': The index provided (1) is greater than or equal
to the maximum bound (1).. | |
| 81 PASS text4.x.baseVal.getItem(1) threw exception IndexSizeError: Failed to execut
e 'getItem' on 'SVGLengthList': The index provided (1) is greater than or equal
to the maximum bound (1).. | |
| 82 | |
| 83 The test passes if you only see 'PASS' messages, and all five text elements on t
op look the same | |
| 84 | |
| 85 PASS successfullyParsed is true | |
| 86 | |
| 87 TEST COMPLETE | |
| 88 | |
| OLD | NEW |