| OLD | NEW |
| 1 This test checks the behavior of the add() method on the select.options object. | 1 This test checks the behavior of the add() method on the select.options object. |
| 2 It covers both the the one-argument (1.x) and two-argument (2.x) signatures of t
he add() method. | 2 It covers both the the one-argument (1.x) and two-argument (2.x) signatures of t
he add() method. |
| 3 | 3 |
| 4 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 4 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
| 5 | 5 |
| 6 | 6 |
| 7 1.1 Add Option to empty Options | 7 1.1 Add Option to empty Options |
| 8 PASS select1.options.length is 1 | 8 PASS select1.options.length is 1 |
| 9 PASS select1.selectedIndex is 0 | 9 PASS select1.selectedIndex is 0 |
| 10 PASS select1.options[0].value is '1' | 10 PASS select1.options[0].value is '1' |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 PASS select1.options.length is 3 | 22 PASS select1.options.length is 3 |
| 23 PASS select1.selectedIndex is 0 | 23 PASS select1.selectedIndex is 0 |
| 24 PASS select1.options[0].value is '1' | 24 PASS select1.options[0].value is '1' |
| 25 PASS select1.options[0].textContent is 'A' | 25 PASS select1.options[0].textContent is 'A' |
| 26 PASS select1.options[1].value is '2' | 26 PASS select1.options[1].value is '2' |
| 27 PASS select1.options[1].textContent is 'B' | 27 PASS select1.options[1].textContent is 'B' |
| 28 PASS select1.options[2].value is '3' | 28 PASS select1.options[2].value is '3' |
| 29 PASS select1.options[2].textContent is 'C' | 29 PASS select1.options[2].textContent is 'C' |
| 30 | 30 |
| 31 1.4 Add a non-Option element | 31 1.4 Add a non-Option element |
| 32 PASS select1.options.add(option1) threw exception TypeMismatchError: The type of
an object was incompatible with the expected type of the parameter associated t
o the object.. | 32 PASS select1.options.add(option1) threw exception TypeError: Failed to execute '
add' on 'HTMLOptionsCollection': The element provided was not an HTMLOptionEleme
nt.. |
| 33 PASS select1.options.length is 3 | 33 PASS select1.options.length is 3 |
| 34 PASS select1.selectedIndex is 0 | 34 PASS select1.selectedIndex is 0 |
| 35 | 35 |
| 36 1.5 Add a non-element (string) | 36 1.5 Add a non-element (string) |
| 37 PASS select1.options.add(option1) threw exception TypeMismatchError: The type of
an object was incompatible with the expected type of the parameter associated t
o the object.. | 37 PASS select1.options.add(option1) threw exception TypeError: Failed to execute '
add' on 'HTMLOptionsCollection': The element provided was not an HTMLOptionEleme
nt.. |
| 38 PASS select1.options.length is 3 | 38 PASS select1.options.length is 3 |
| 39 PASS select1.selectedIndex is 0 | 39 PASS select1.selectedIndex is 0 |
| 40 | 40 |
| 41 1.6 Add a non-element (number) | 41 1.6 Add a non-element (number) |
| 42 PASS select1.options.add(option1) threw exception TypeMismatchError: The type of
an object was incompatible with the expected type of the parameter associated t
o the object.. | 42 PASS select1.options.add(option1) threw exception TypeError: Failed to execute '
add' on 'HTMLOptionsCollection': The element provided was not an HTMLOptionEleme
nt.. |
| 43 PASS select1.options.length is 3 | 43 PASS select1.options.length is 3 |
| 44 PASS select1.selectedIndex is 0 | 44 PASS select1.selectedIndex is 0 |
| 45 | 45 |
| 46 1.7 Add a non-element (boolean) | 46 1.7 Add a non-element (boolean) |
| 47 PASS select1.options.add(option1) threw exception TypeMismatchError: The type of
an object was incompatible with the expected type of the parameter associated t
o the object.. | 47 PASS select1.options.add(option1) threw exception TypeError: Failed to execute '
add' on 'HTMLOptionsCollection': The element provided was not an HTMLOptionEleme
nt.. |
| 48 PASS select1.options.length is 3 | 48 PASS select1.options.length is 3 |
| 49 PASS select1.selectedIndex is 0 | 49 PASS select1.selectedIndex is 0 |
| 50 | 50 |
| 51 1.8 Add undefined | 51 1.8 Add undefined |
| 52 PASS select1.options.add(option1) threw exception TypeMismatchError: The type of
an object was incompatible with the expected type of the parameter associated t
o the object.. | 52 PASS select1.options.add(option1) threw exception TypeError: Failed to execute '
add' on 'HTMLOptionsCollection': The element provided was not an HTMLOptionEleme
nt.. |
| 53 PASS select1.options.length is 3 | 53 PASS select1.options.length is 3 |
| 54 PASS select1.selectedIndex is 0 | 54 PASS select1.selectedIndex is 0 |
| 55 | 55 |
| 56 1.9 Add null | 56 1.9 Add null |
| 57 PASS select1.options.add(option1) threw exception TypeMismatchError: The type of
an object was incompatible with the expected type of the parameter associated t
o the object.. | 57 PASS select1.options.add(option1) threw exception TypeError: Failed to execute '
add' on 'HTMLOptionsCollection': The element provided was not an HTMLOptionEleme
nt.. |
| 58 PASS select1.options.length is 3 | 58 PASS select1.options.length is 3 |
| 59 PASS select1.selectedIndex is 0 | 59 PASS select1.selectedIndex is 0 |
| 60 | 60 |
| 61 1.10 Add negative infinity | 61 1.10 Add negative infinity |
| 62 PASS select1.options.add(option1) threw exception TypeMismatchError: The type of
an object was incompatible with the expected type of the parameter associated t
o the object.. | 62 PASS select1.options.add(option1) threw exception TypeError: Failed to execute '
add' on 'HTMLOptionsCollection': The element provided was not an HTMLOptionEleme
nt.. |
| 63 PASS select1.options.length is 3 | 63 PASS select1.options.length is 3 |
| 64 PASS select1.selectedIndex is 0 | 64 PASS select1.selectedIndex is 0 |
| 65 | 65 |
| 66 1.11 Add NaN | 66 1.11 Add NaN |
| 67 PASS select1.options.add(option1) threw exception TypeMismatchError: The type of
an object was incompatible with the expected type of the parameter associated t
o the object.. | 67 PASS select1.options.add(option1) threw exception TypeError: Failed to execute '
add' on 'HTMLOptionsCollection': The element provided was not an HTMLOptionEleme
nt.. |
| 68 PASS select1.options.length is 3 | 68 PASS select1.options.length is 3 |
| 69 PASS select1.selectedIndex is 0 | 69 PASS select1.selectedIndex is 0 |
| 70 | 70 |
| 71 1.12 Add positive infinity | 71 1.12 Add positive infinity |
| 72 PASS select1.options.add(option1) threw exception TypeMismatchError: The type of
an object was incompatible with the expected type of the parameter associated t
o the object.. | 72 PASS select1.options.add(option1) threw exception TypeError: Failed to execute '
add' on 'HTMLOptionsCollection': The element provided was not an HTMLOptionEleme
nt.. |
| 73 PASS select1.options.length is 3 | 73 PASS select1.options.length is 3 |
| 74 PASS select1.selectedIndex is 0 | 74 PASS select1.selectedIndex is 0 |
| 75 | 75 |
| 76 2.1 Add Option to empty Options | 76 2.1 Add Option to empty Options |
| 77 PASS select2.options.length is 1 | 77 PASS select2.options.length is 1 |
| 78 PASS select2.selectedIndex is 0 | 78 PASS select2.selectedIndex is 0 |
| 79 PASS select2.options[0].value is '1' | 79 PASS select2.options[0].value is '1' |
| 80 PASS select2.options[0].textContent is 'A' | 80 PASS select2.options[0].textContent is 'A' |
| 81 | 81 |
| 82 2.2 Add Option after setting parameters | 82 2.2 Add Option after setting parameters |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 PASS select2.options.add(option2, 0/0) did not throw exception. | 171 PASS select2.options.add(option2, 0/0) did not throw exception. |
| 172 PASS select2.options.length is 9 | 172 PASS select2.options.length is 9 |
| 173 PASS select2.selectedIndex is 3 | 173 PASS select2.selectedIndex is 3 |
| 174 | 174 |
| 175 2.11 Add an Option at index Infinity | 175 2.11 Add an Option at index Infinity |
| 176 PASS select2.options.add(option2, 1/0) did not throw exception. | 176 PASS select2.options.add(option2, 1/0) did not throw exception. |
| 177 PASS select2.options.length is 10 | 177 PASS select2.options.length is 10 |
| 178 PASS select2.selectedIndex is 4 | 178 PASS select2.selectedIndex is 4 |
| 179 | 179 |
| 180 2.12 Add a non-Option element | 180 2.12 Add a non-Option element |
| 181 PASS select2.options.add(option2, 1) threw exception TypeMismatchError: The type
of an object was incompatible with the expected type of the parameter associate
d to the object.. | 181 PASS select2.options.add(option2, 1) threw exception TypeError: Failed to execut
e 'add' on 'HTMLOptionsCollection': The element provided was not an HTMLOptionEl
ement.. |
| 182 PASS select2.options.length is 10 | 182 PASS select2.options.length is 10 |
| 183 PASS select2.selectedIndex is 4 | 183 PASS select2.selectedIndex is 4 |
| 184 | 184 |
| 185 2.13 Add a non-element (string) | 185 2.13 Add a non-element (string) |
| 186 PASS select2.options.add(option2, 1) threw exception TypeMismatchError: The type
of an object was incompatible with the expected type of the parameter associate
d to the object.. | 186 PASS select2.options.add(option2, 1) threw exception TypeError: Failed to execut
e 'add' on 'HTMLOptionsCollection': The element provided was not an HTMLOptionEl
ement.. |
| 187 PASS select2.options.length is 10 | 187 PASS select2.options.length is 10 |
| 188 PASS select2.selectedIndex is 4 | 188 PASS select2.selectedIndex is 4 |
| 189 | 189 |
| 190 2.14 Add a non-element (number) | 190 2.14 Add a non-element (number) |
| 191 PASS select2.options.add(option2, 1) threw exception TypeMismatchError: The type
of an object was incompatible with the expected type of the parameter associate
d to the object.. | 191 PASS select2.options.add(option2, 1) threw exception TypeError: Failed to execut
e 'add' on 'HTMLOptionsCollection': The element provided was not an HTMLOptionEl
ement.. |
| 192 PASS select2.options.length is 10 | 192 PASS select2.options.length is 10 |
| 193 PASS select2.selectedIndex is 4 | 193 PASS select2.selectedIndex is 4 |
| 194 | 194 |
| 195 2.15 Add a non-element (boolean) | 195 2.15 Add a non-element (boolean) |
| 196 PASS select2.options.add(option2, 1) threw exception TypeMismatchError: The type
of an object was incompatible with the expected type of the parameter associate
d to the object.. | 196 PASS select2.options.add(option2, 1) threw exception TypeError: Failed to execut
e 'add' on 'HTMLOptionsCollection': The element provided was not an HTMLOptionEl
ement.. |
| 197 PASS select2.options.length is 10 | 197 PASS select2.options.length is 10 |
| 198 PASS select2.selectedIndex is 4 | 198 PASS select2.selectedIndex is 4 |
| 199 | 199 |
| 200 2.16 Add undefined | 200 2.16 Add undefined |
| 201 PASS select2.options.add(option2, 1) threw exception TypeMismatchError: The type
of an object was incompatible with the expected type of the parameter associate
d to the object.. | 201 PASS select2.options.add(option2, 1) threw exception TypeError: Failed to execut
e 'add' on 'HTMLOptionsCollection': The element provided was not an HTMLOptionEl
ement.. |
| 202 PASS select2.options.length is 10 | 202 PASS select2.options.length is 10 |
| 203 PASS select2.selectedIndex is 4 | 203 PASS select2.selectedIndex is 4 |
| 204 | 204 |
| 205 2.17 Add null | 205 2.17 Add null |
| 206 PASS select2.options.add(option2, 1) threw exception TypeMismatchError: The type
of an object was incompatible with the expected type of the parameter associate
d to the object.. | 206 PASS select2.options.add(option2, 1) threw exception TypeError: Failed to execut
e 'add' on 'HTMLOptionsCollection': The element provided was not an HTMLOptionEl
ement.. |
| 207 PASS select2.options.length is 10 | 207 PASS select2.options.length is 10 |
| 208 PASS select2.selectedIndex is 4 | 208 PASS select2.selectedIndex is 4 |
| 209 | 209 |
| 210 2.18 Add negative infinity | 210 2.18 Add negative infinity |
| 211 PASS select2.options.add(option2, 1) threw exception TypeMismatchError: The type
of an object was incompatible with the expected type of the parameter associate
d to the object.. | 211 PASS select2.options.add(option2, 1) threw exception TypeError: Failed to execut
e 'add' on 'HTMLOptionsCollection': The element provided was not an HTMLOptionEl
ement.. |
| 212 PASS select2.options.length is 10 | 212 PASS select2.options.length is 10 |
| 213 PASS select2.selectedIndex is 4 | 213 PASS select2.selectedIndex is 4 |
| 214 | 214 |
| 215 2.19 Add NaN | 215 2.19 Add NaN |
| 216 PASS select2.options.add(option2, 1) threw exception TypeMismatchError: The type
of an object was incompatible with the expected type of the parameter associate
d to the object.. | 216 PASS select2.options.add(option2, 1) threw exception TypeError: Failed to execut
e 'add' on 'HTMLOptionsCollection': The element provided was not an HTMLOptionEl
ement.. |
| 217 PASS select2.options.length is 10 | 217 PASS select2.options.length is 10 |
| 218 PASS select2.selectedIndex is 4 | 218 PASS select2.selectedIndex is 4 |
| 219 | 219 |
| 220 2.20 Add positive infinity | 220 2.20 Add positive infinity |
| 221 PASS select2.options.add(option2, 1) threw exception TypeMismatchError: The type
of an object was incompatible with the expected type of the parameter associate
d to the object.. | 221 PASS select2.options.add(option2, 1) threw exception TypeError: Failed to execut
e 'add' on 'HTMLOptionsCollection': The element provided was not an HTMLOptionEl
ement.. |
| 222 PASS select2.options.length is 10 | 222 PASS select2.options.length is 10 |
| 223 PASS select2.selectedIndex is 4 | 223 PASS select2.selectedIndex is 4 |
| 224 | 224 |
| 225 PASS successfullyParsed is true | 225 PASS successfullyParsed is true |
| 226 | 226 |
| 227 TEST COMPLETE | 227 TEST COMPLETE |
| 228 | 228 |
| OLD | NEW |