OLD | NEW |
| (Empty) |
1 ABC | |
2 ABC | |
3 ABC | |
4 ABC | |
5 ABC | |
6 This is a test of the SVGLengthList::replaceItem() API. | |
7 | |
8 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | |
9 | |
10 | |
11 | |
12 Create three SVGLength objects, with values=50,100,150 | |
13 PASS newLength1.value is 50 | |
14 PASS newLength2.value is 100 | |
15 PASS newLength3.value is 150 | |
16 | |
17 Check initial list state of text1 | |
18 PASS text1.x.baseVal.numberOfItems is 3 | |
19 PASS text1.x.baseVal.getItem(0).value is 500 | |
20 PASS text1.x.baseVal.getItem(1).value is 1000 | |
21 PASS text1.x.baseVal.getItem(2).value is 1500 | |
22 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).. | |
23 | |
24 Replace the first three values in text1 x list with 'newLength1/2/3' | |
25 PASS text1.x.baseVal.replaceItem(newLength1, 0) is newLength1 | |
26 PASS text1.x.baseVal.replaceItem(newLength2, 1) is newLength2 | |
27 PASS text1.x.baseVal.replaceItem(newLength3, 2) is newLength3 | |
28 PASS text1.x.baseVal.replaceItem(newLength3, -100) threw exception IndexSizeErro
r: Failed to execute 'replaceItem' on 'SVGLengthList': The index provided (42949
67196) is greater than the maximum bound (3).. | |
29 PASS text1.x.baseVal.replaceItem(newLength3, -1) threw exception IndexSizeError:
Failed to execute 'replaceItem' on 'SVGLengthList': The index provided (4294967
295) is greater than the maximum bound (3).. | |
30 PASS text1.x.baseVal.replaceItem(newLength3, 3) threw exception IndexSizeError:
Failed to execute 'replaceItem' on 'SVGLengthList': The index provided (3) is gr
eater than or equal to the maximum bound (3).. | |
31 PASS text1.x.baseVal.replaceItem(newLength3, 100) threw exception IndexSizeError
: Failed to execute 'replaceItem' on 'SVGLengthList': The index provided (100) i
s greater than the maximum bound (3).. | |
32 | |
33 Verify that the text1 x value list is correct | |
34 PASS text1.x.baseVal.numberOfItems is 3 | |
35 PASS text1.x.baseVal.getItem(0).value is 50 | |
36 PASS text1.x.baseVal.getItem(1).value is 100 | |
37 PASS text1.x.baseVal.getItem(2).value is 150 | |
38 | |
39 Check initial list state of text2 | |
40 PASS text2.x.baseVal.numberOfItems is 4 | |
41 PASS text2.x.baseVal.getItem(0).value is 500 | |
42 PASS text2.x.baseVal.getItem(1).value is 100 | |
43 PASS text2.x.baseVal.getItem(2).value is 150 | |
44 PASS text2.x.baseVal.getItem(3).value is 50 | |
45 PASS text2.x.baseVal.getItem(4) threw exception IndexSizeError: Failed to execut
e 'getItem' on 'SVGLengthList': The index provided (4) is greater than or equal
to the maximum bound (4).. | |
46 | |
47 Replace the first item in text2 x list with the fourth item in the list | |
48 PASS text2.x.baseVal.replaceItem(text2.x.baseVal.getItem(3), 0).value is 50 | |
49 PASS text2.x.baseVal.numberOfItems is 4 | |
50 PASS text2.x.baseVal.getItem(0).value is 50 | |
51 PASS text2.x.baseVal.getItem(1).value is 100 | |
52 PASS text2.x.baseVal.getItem(2).value is 150 | |
53 PASS text2.x.baseVal.getItem(3).value is 50 | |
54 | |
55 Check initial list state of text3 | |
56 PASS text3.x.baseVal.numberOfItems is 5 | |
57 PASS text3.x.baseVal.getItem(0).value is 50 | |
58 PASS text3.x.baseVal.getItem(1).value is 50 | |
59 PASS text3.x.baseVal.getItem(2).value is 100 | |
60 PASS text3.x.baseVal.getItem(3).value is 100 | |
61 PASS text3.x.baseVal.getItem(4).value is 150 | |
62 PASS text3.x.baseVal.getItem(5) threw exception IndexSizeError: Failed to execut
e 'getItem' on 'SVGLengthList': The index provided (5) is greater than or equal
to the maximum bound (5).. | |
63 | |
64 Check initial list state of text4 | |
65 PASS text4.x.baseVal.numberOfItems is 4 | |
66 PASS text4.x.baseVal.getItem(0).value is 100 | |
67 PASS text4.x.baseVal.getItem(1).value is 50 | |
68 PASS text4.x.baseVal.getItem(2).value is 150 | |
69 PASS text4.x.baseVal.getItem(3).value is 150 | |
70 PASS text4.x.baseVal.getItem(4) threw exception IndexSizeError: Failed to execut
e 'getItem' on 'SVGLengthList': The index provided (4) is greater than or equal
to the maximum bound (4).. | |
71 | |
72 Replace the first item in text4 x list with the second item in the text3 x list | |
73 PASS text4.x.baseVal.replaceItem(text3.x.baseVal.getItem(1), 0).value is 50 | |
74 PASS text3.x.baseVal.numberOfItems is 5 | |
75 PASS text3.x.baseVal.getItem(0).value is 50 | |
76 PASS text3.x.baseVal.getItem(1).value is 50 | |
77 PASS text3.x.baseVal.getItem(2).value is 100 | |
78 PASS text3.x.baseVal.getItem(3).value is 100 | |
79 PASS text3.x.baseVal.getItem(4).value is 150 | |
80 PASS text3.x.baseVal.getItem(5) threw exception IndexSizeError: Failed to execut
e 'getItem' on 'SVGLengthList': The index provided (5) is greater than or equal
to the maximum bound (5).. | |
81 PASS text4.x.baseVal.numberOfItems is 4 | |
82 PASS text4.x.baseVal.getItem(0).value is 50 | |
83 PASS text4.x.baseVal.getItem(1).value is 50 | |
84 PASS text4.x.baseVal.getItem(2).value is 150 | |
85 PASS text4.x.baseVal.getItem(3).value is 150 | |
86 PASS text4.x.baseVal.getItem(4) threw exception IndexSizeError: Failed to execut
e 'getItem' on 'SVGLengthList': The index provided (4) is greater than or equal
to the maximum bound (4).. | |
87 | |
88 Replace the second item in text4 x list with the second item in the text4 x list | |
89 PASS text4.x.baseVal.replaceItem(text3.x.baseVal.getItem(2), 1).value is 100 | |
90 PASS text4.x.baseVal.numberOfItems is 4 | |
91 PASS text4.x.baseVal.getItem(0).value is 50 | |
92 PASS text4.x.baseVal.getItem(1).value is 100 | |
93 PASS text4.x.baseVal.getItem(2).value is 150 | |
94 PASS text4.x.baseVal.getItem(3).value is 150 | |
95 PASS text4.x.baseVal.getItem(4) threw exception IndexSizeError: Failed to execut
e 'getItem' on 'SVGLengthList': The index provided (4) is greater than or equal
to the maximum bound (4).. | |
96 | |
97 Replace the items of text3 x list with the same text3 x list | |
98 PASS text3.x.baseVal.replaceItem(text3.x.baseVal.getItem(2), 1).value is 100 | |
99 PASS text3.x.baseVal.replaceItem(text3.x.baseVal.getItem(4), 2).value is 150 | |
100 PASS text3.x.baseVal.numberOfItems is 5 | |
101 PASS text3.x.baseVal.getItem(0).value is 50 | |
102 PASS text3.x.baseVal.getItem(1).value is 100 | |
103 PASS text3.x.baseVal.getItem(2).value is 150 | |
104 PASS text3.x.baseVal.getItem(3).value is 100 | |
105 PASS text3.x.baseVal.getItem(4).value is 150 | |
106 PASS text3.x.baseVal.getItem(5) threw exception IndexSizeError: Failed to execut
e 'getItem' on 'SVGLengthList': The index provided (5) is greater than or equal
to the maximum bound (5).. | |
107 | |
108 Check final list state of text1 | |
109 PASS text1.x.baseVal.numberOfItems is 3 | |
110 PASS text1.x.baseVal.getItem(0).value is 50 | |
111 PASS text1.x.baseVal.getItem(1).value is 100 | |
112 PASS text1.x.baseVal.getItem(2).value is 150 | |
113 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).. | |
114 | |
115 Check final list state of text2 | |
116 PASS text2.x.baseVal.numberOfItems is 4 | |
117 PASS text2.x.baseVal.getItem(0).value is 50 | |
118 PASS text2.x.baseVal.getItem(1).value is 100 | |
119 PASS text2.x.baseVal.getItem(2).value is 150 | |
120 PASS text2.x.baseVal.getItem(3).value is 50 | |
121 PASS text2.x.baseVal.getItem(4) threw exception IndexSizeError: Failed to execut
e 'getItem' on 'SVGLengthList': The index provided (4) is greater than or equal
to the maximum bound (4).. | |
122 | |
123 Check final list state of text3 | |
124 PASS text3.x.baseVal.numberOfItems is 5 | |
125 PASS text3.x.baseVal.getItem(0).value is 50 | |
126 PASS text3.x.baseVal.getItem(1).value is 100 | |
127 PASS text3.x.baseVal.getItem(2).value is 150 | |
128 PASS text3.x.baseVal.getItem(3).value is 100 | |
129 PASS text3.x.baseVal.getItem(4).value is 150 | |
130 PASS text3.x.baseVal.getItem(5) threw exception IndexSizeError: Failed to execut
e 'getItem' on 'SVGLengthList': The index provided (5) is greater than or equal
to the maximum bound (5).. | |
131 | |
132 Check final list state of text4 | |
133 PASS text4.x.baseVal.numberOfItems is 4 | |
134 PASS text4.x.baseVal.getItem(0).value is 50 | |
135 PASS text4.x.baseVal.getItem(1).value is 100 | |
136 PASS text4.x.baseVal.getItem(2).value is 150 | |
137 PASS text4.x.baseVal.getItem(3).value is 150 | |
138 PASS text4.x.baseVal.getItem(4) threw exception IndexSizeError: Failed to execut
e 'getItem' on 'SVGLengthList': The index provided (4) is greater than or equal
to the maximum bound (4).. | |
139 | |
140 The test passes if you only see 'PASS' messages, and all five text elements on t
op look the same | |
141 | |
142 PASS successfullyParsed is true | |
143 | |
144 TEST COMPLETE | |
145 | |
OLD | NEW |