Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: LayoutTests/fast/js/select-options-add-expected.txt

Issue 726793002: IDL: Update type error message for invalid union values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 TypeError: Failed to execute ' add' on 'HTMLOptionsCollection': Not a valid union member.. 32 PASS select1.options.add(option1) threw exception TypeError: Failed to execute ' add' on 'HTMLOptionsCollection': The provided value is not of type '(HTMLOptionE lement or HTMLOptGroupElement)'.
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 TypeError: Failed to execute ' add' on 'HTMLOptionsCollection': Not a valid union member.. 37 PASS select1.options.add(option1) threw exception TypeError: Failed to execute ' add' on 'HTMLOptionsCollection': The provided value is not of type '(HTMLOptionE lement or HTMLOptGroupElement)'.
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 TypeError: Failed to execute ' add' on 'HTMLOptionsCollection': Not a valid union member.. 42 PASS select1.options.add(option1) threw exception TypeError: Failed to execute ' add' on 'HTMLOptionsCollection': The provided value is not of type '(HTMLOptionE lement or HTMLOptGroupElement)'.
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 TypeError: Failed to execute ' add' on 'HTMLOptionsCollection': Not a valid union member.. 47 PASS select1.options.add(option1) threw exception TypeError: Failed to execute ' add' on 'HTMLOptionsCollection': The provided value is not of type '(HTMLOptionE lement or HTMLOptGroupElement)'.
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 TypeError: Failed to execute ' add' on 'HTMLOptionsCollection': Not a valid union member.. 52 PASS select1.options.add(option1) threw exception TypeError: Failed to execute ' add' on 'HTMLOptionsCollection': The provided value is not of type '(HTMLOptionE lement or HTMLOptGroupElement)'.
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 TypeError: Failed to execute ' add' on 'HTMLOptionsCollection': Not a valid union member.. 57 PASS select1.options.add(option1) threw exception TypeError: Failed to execute ' add' on 'HTMLOptionsCollection': The provided value is not of type '(HTMLOptionE lement or HTMLOptGroupElement)'.
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 TypeError: Failed to execute ' add' on 'HTMLOptionsCollection': Not a valid union member.. 62 PASS select1.options.add(option1) threw exception TypeError: Failed to execute ' add' on 'HTMLOptionsCollection': The provided value is not of type '(HTMLOptionE lement or HTMLOptGroupElement)'.
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 TypeError: Failed to execute ' add' on 'HTMLOptionsCollection': Not a valid union member.. 67 PASS select1.options.add(option1) threw exception TypeError: Failed to execute ' add' on 'HTMLOptionsCollection': The provided value is not of type '(HTMLOptionE lement or HTMLOptGroupElement)'.
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 TypeError: Failed to execute ' add' on 'HTMLOptionsCollection': Not a valid union member.. 72 PASS select1.options.add(option1) threw exception TypeError: Failed to execute ' add' on 'HTMLOptionsCollection': The provided value is not of type '(HTMLOptionE lement or HTMLOptGroupElement)'.
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
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 10 172 PASS select2.options.length is 10
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 11 177 PASS select2.options.length is 11
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 TypeError: Failed to execut e 'add' on 'HTMLOptionsCollection': Not a valid union member.. 181 PASS select2.options.add(option2, 1) threw exception TypeError: Failed to execut e 'add' on 'HTMLOptionsCollection': The provided value is not of type '(HTMLOpti onElement or HTMLOptGroupElement)'.
182 PASS select2.options.length is 11 182 PASS select2.options.length is 11
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 TypeError: Failed to execut e 'add' on 'HTMLOptionsCollection': Not a valid union member.. 186 PASS select2.options.add(option2, 1) threw exception TypeError: Failed to execut e 'add' on 'HTMLOptionsCollection': The provided value is not of type '(HTMLOpti onElement or HTMLOptGroupElement)'.
187 PASS select2.options.length is 11 187 PASS select2.options.length is 11
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 TypeError: Failed to execut e 'add' on 'HTMLOptionsCollection': Not a valid union member.. 191 PASS select2.options.add(option2, 1) threw exception TypeError: Failed to execut e 'add' on 'HTMLOptionsCollection': The provided value is not of type '(HTMLOpti onElement or HTMLOptGroupElement)'.
192 PASS select2.options.length is 11 192 PASS select2.options.length is 11
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 TypeError: Failed to execut e 'add' on 'HTMLOptionsCollection': Not a valid union member.. 196 PASS select2.options.add(option2, 1) threw exception TypeError: Failed to execut e 'add' on 'HTMLOptionsCollection': The provided value is not of type '(HTMLOpti onElement or HTMLOptGroupElement)'.
197 PASS select2.options.length is 11 197 PASS select2.options.length is 11
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 TypeError: Failed to execut e 'add' on 'HTMLOptionsCollection': Not a valid union member.. 201 PASS select2.options.add(option2, 1) threw exception TypeError: Failed to execut e 'add' on 'HTMLOptionsCollection': The provided value is not of type '(HTMLOpti onElement or HTMLOptGroupElement)'.
202 PASS select2.options.length is 11 202 PASS select2.options.length is 11
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 TypeError: Failed to execut e 'add' on 'HTMLOptionsCollection': Not a valid union member.. 206 PASS select2.options.add(option2, 1) threw exception TypeError: Failed to execut e 'add' on 'HTMLOptionsCollection': The provided value is not of type '(HTMLOpti onElement or HTMLOptGroupElement)'.
207 PASS select2.options.length is 11 207 PASS select2.options.length is 11
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 TypeError: Failed to execut e 'add' on 'HTMLOptionsCollection': Not a valid union member.. 211 PASS select2.options.add(option2, 1) threw exception TypeError: Failed to execut e 'add' on 'HTMLOptionsCollection': The provided value is not of type '(HTMLOpti onElement or HTMLOptGroupElement)'.
212 PASS select2.options.length is 11 212 PASS select2.options.length is 11
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 TypeError: Failed to execut e 'add' on 'HTMLOptionsCollection': Not a valid union member.. 216 PASS select2.options.add(option2, 1) threw exception TypeError: Failed to execut e 'add' on 'HTMLOptionsCollection': The provided value is not of type '(HTMLOpti onElement or HTMLOptGroupElement)'.
217 PASS select2.options.length is 11 217 PASS select2.options.length is 11
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 TypeError: Failed to execut e 'add' on 'HTMLOptionsCollection': Not a valid union member.. 221 PASS select2.options.add(option2, 1) threw exception TypeError: Failed to execut e 'add' on 'HTMLOptionsCollection': The provided value is not of type '(HTMLOpti onElement or HTMLOptGroupElement)'.
222 PASS select2.options.length is 11 222 PASS select2.options.length is 11
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
OLDNEW
« no previous file with comments | « LayoutTests/fast/forms/select/select-add-expected.txt ('k') | Source/bindings/scripts/v8_union.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698