Skip to content

Commit 87db59f

Browse files
committed
Update tests for relaxed <select> parser
This PR updates the tree-construction dat files for the HTML change which will allow additional tags within <select>: whatwg/html#10557
1 parent a9f4496 commit 87db59f

File tree

10 files changed

+101
-121
lines changed

10 files changed

+101
-121
lines changed

tree-construction/menuitem-element.dat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,13 @@
161161
#data
162162
<!DOCTYPE html><select><menuitem></select>
163163
#errors
164-
33: Stray start tag “menuitem”.
165164
#document
166165
| <!DOCTYPE html>
167166
| <html>
168167
| <head>
169168
| <body>
170169
| <select>
170+
| <menuitem>
171171

172172
#data
173173
<!DOCTYPE html><option><menuitem>

tree-construction/tests1.dat

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -355,19 +355,18 @@ Line1<br>Line2<br>Line3<br>Line4
355355
#data
356356
<select><b><option><select><option></b></select>X
357357
#errors
358-
(1,8): expected-doctype-but-got-start-tag
359-
(1,11): unexpected-start-tag-in-select
360-
(1,27): unexpected-select-in-select
361-
(1,39): unexpected-end-tag
362-
(1,48): unexpected-end-tag
363358
#document
364359
| <html>
365360
| <head>
366361
| <body>
367362
| <select>
368-
| <option>
369-
| <option>
370-
| "X"
363+
| <b>
364+
| <option>
365+
| <b>
366+
| <select>
367+
| <b>
368+
| <option>
369+
| "X"
371370

372371
#data
373372
<a><table><td><a><table></table><a></tr><a></table><b>X</b>C<a>Y
@@ -1532,18 +1531,17 @@ Line1<br>Line2<br>Line3<br>Line4
15321531
#data
15331532
<select><b><option><select><option></b></select>
15341533
#errors
1535-
(1,8): expected-doctype-but-got-start-tag
1536-
(1,11): unexpected-start-tag-in-select
1537-
(1,27): unexpected-select-in-select
1538-
(1,39): unexpected-end-tag
1539-
(1,48): unexpected-end-tag
15401534
#document
15411535
| <html>
15421536
| <head>
15431537
| <body>
15441538
| <select>
1545-
| <option>
1546-
| <option>
1539+
| <b>
1540+
| <option>
1541+
| <b>
1542+
| <select>
1543+
| <b>
1544+
| <option>
15471545

15481546
#data
15491547
<html><head><title></title><body></body></html>

tree-construction/tests10.dat

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,25 @@
3535
#data
3636
<!DOCTYPE html><body><select><svg></svg></select>
3737
#errors
38-
(1,34) unexpected-start-tag-in-select
39-
(1,40) unexpected-end-tag-in-select
4038
#document
4139
| <!DOCTYPE html>
4240
| <html>
4341
| <head>
4442
| <body>
4543
| <select>
44+
| <svg svg>
4645

4746
#data
4847
<!DOCTYPE html><body><select><option><svg></svg></option></select>
4948
#errors
50-
(1,42) unexpected-start-tag-in-select
51-
(1,48) unexpected-end-tag-in-select
5249
#document
5350
| <!DOCTYPE html>
5451
| <html>
5552
| <head>
5653
| <body>
5754
| <select>
5855
| <option>
56+
| <svg svg>
5957

6058
#data
6159
<!DOCTYPE html><body><table><svg></svg></table>
@@ -261,13 +259,6 @@
261259
#data
262260
<!DOCTYPE html><body><table><tr><td><select><svg><g>foo</g><g>bar</g><p>baz</table><p>quux
263261
#errors
264-
(1,49) unexpected-start-tag-in-select
265-
(1,52) unexpected-start-tag-in-select
266-
(1,59) unexpected-end-tag-in-select
267-
(1,62) unexpected-start-tag-in-select
268-
(1,69) unexpected-end-tag-in-select
269-
(1,72) unexpected-start-tag-in-select
270-
(1,83) unexpected-table-element-end-tag-in-select-in-table
271262
#document
272263
| <!DOCTYPE html>
273264
| <html>
@@ -278,28 +269,32 @@
278269
| <tr>
279270
| <td>
280271
| <select>
281-
| "foobarbaz"
272+
| <svg svg>
273+
| <svg g>
274+
| "foo"
275+
| <svg g>
276+
| "bar"
277+
| <p>
278+
| "baz"
282279
| <p>
283280
| "quux"
284281

285282
#data
286283
<!DOCTYPE html><body><table><select><svg><g>foo</g><g>bar</g><p>baz</table><p>quux
287284
#errors
288-
(1,36) unexpected-start-tag-implies-table-voodoo
289-
(1,41) unexpected-start-tag-in-select
290-
(1,44) unexpected-start-tag-in-select
291-
(1,51) unexpected-end-tag-in-select
292-
(1,54) unexpected-start-tag-in-select
293-
(1,61) unexpected-end-tag-in-select
294-
(1,64) unexpected-start-tag-in-select
295-
(1,75) unexpected-table-element-end-tag-in-select-in-table
296285
#document
297286
| <!DOCTYPE html>
298287
| <html>
299288
| <head>
300289
| <body>
301290
| <select>
302-
| "foobarbaz"
291+
| <svg svg>
292+
| <svg g>
293+
| "foo"
294+
| <svg g>
295+
| "bar"
296+
| <p>
297+
| "baz"
303298
| <table>
304299
| <p>
305300
| "quux"

tree-construction/tests18.dat

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -227,34 +227,27 @@
227227
#data
228228
<!doctype html><select><plaintext></plaintext>X
229229
#errors
230-
34: Stray start tag “plaintext”.
231-
46: Stray end tag “plaintext”.
232-
47: End of file seen and there were open elements.
233230
#document
234231
| <!DOCTYPE html>
235232
| <html>
236233
| <head>
237234
| <body>
238235
| <select>
239-
| "X"
236+
| <plaintext>
237+
| "</plaintext>X"
240238

241239
#data
242240
<!doctype html><table><select><plaintext>a<caption>b
243241
#errors
244-
30: Start tag “select” seen in “table”.
245-
41: Stray start tag “plaintext”.
246-
51: “caption” start tag with “select” open.
247-
52: End of file seen and there were open elements.
248242
#document
249243
| <!DOCTYPE html>
250244
| <html>
251245
| <head>
252246
| <body>
253247
| <select>
254-
| "a"
248+
| <plaintext>
249+
| "a<caption>b"
255250
| <table>
256-
| <caption>
257-
| "b"
258251

259252
#data
260253
<!doctype html><template><plaintext>a</template>b

tree-construction/tests2.dat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,6 @@
500500
#data
501501
<!DOCTYPE html><select><optgroup><option></optgroup><option><select><option>
502502
#errors
503-
(1,68): unexpected-select-in-select
504503
#document
505504
| <!DOCTYPE html>
506505
| <html>
@@ -510,7 +509,8 @@
510509
| <optgroup>
511510
| <option>
512511
| <option>
513-
| <option>
512+
| <select>
513+
| <option>
514514

515515
#data
516516
<!DOCTYPE html><select><optgroup><option><optgroup>

tree-construction/tests7.dat

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,27 +200,26 @@ X</listing>
200200
#data
201201
<!doctype html><select><input>X
202202
#errors
203-
(1,30): unexpected-input-in-select
204203
#document
205204
| <!DOCTYPE html>
206205
| <html>
207206
| <head>
208207
| <body>
209208
| <select>
210-
| <input>
211-
| "X"
209+
| <input>
210+
| "X"
212211

213212
#data
214213
<!doctype html><select><select>X
215214
#errors
216-
(1,31): unexpected-select-in-select
217215
#document
218216
| <!DOCTYPE html>
219217
| <html>
220218
| <head>
221219
| <body>
222220
| <select>
223-
| "X"
221+
| <select>
222+
| "X"
224223

225224
#data
226225
<!doctype html><table><input type=hidDEN></table>
@@ -443,11 +442,9 @@ A<table><tr> B</tr> </em>C</table>
443442
#data
444443
<select><keygen>
445444
#errors
446-
(1,8): expected-doctype-but-got-start-tag
447-
(1,16): unexpected-input-in-select
448445
#document
449446
| <html>
450447
| <head>
451448
| <body>
452449
| <select>
453-
| <keygen>
450+
| <keygen>

tree-construction/tests9.dat

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -48,27 +48,25 @@
4848
#data
4949
<!DOCTYPE html><body><select><math></math></select>
5050
#errors
51-
(1,35) unexpected-start-tag-in-select
52-
(1,42) unexpected-end-tag-in-select
5351
#document
5452
| <!DOCTYPE html>
5553
| <html>
5654
| <head>
5755
| <body>
5856
| <select>
57+
| <math math>
5958

6059
#data
6160
<!DOCTYPE html><body><select><option><math></math></option></select>
6261
#errors
63-
(1,43) unexpected-start-tag-in-select
64-
(1,50) unexpected-end-tag-in-select
6562
#document
6663
| <!DOCTYPE html>
6764
| <html>
6865
| <head>
6966
| <body>
7067
| <select>
7168
| <option>
69+
| <math math>
7270

7371
#data
7472
<!DOCTYPE html><body><table><math></math></table>
@@ -301,13 +299,6 @@
301299
#data
302300
<!DOCTYPE html><body><table><tr><td><select><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux
303301
#errors
304-
(1,50) unexpected-start-tag-in-select
305-
(1,54) unexpected-start-tag-in-select
306-
(1,62) unexpected-end-tag-in-select
307-
(1,66) unexpected-start-tag-in-select
308-
(1,74) unexpected-end-tag-in-select
309-
(1,77) unexpected-start-tag-in-select
310-
(1,88) unexpected-table-element-end-tag-in-select-in-table
311302
#document
312303
| <!DOCTYPE html>
313304
| <html>
@@ -318,28 +309,32 @@
318309
| <tr>
319310
| <td>
320311
| <select>
321-
| "foobarbaz"
312+
| <math math>
313+
| <math mi>
314+
| "foo"
315+
| <math mi>
316+
| "bar"
317+
| <p>
318+
| "baz"
322319
| <p>
323320
| "quux"
324321

325322
#data
326323
<!DOCTYPE html><body><table><select><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux
327324
#errors
328-
(1,36) unexpected-start-tag-implies-table-voodoo
329-
(1,42) unexpected-start-tag-in-select
330-
(1,46) unexpected-start-tag-in-select
331-
(1,54) unexpected-end-tag-in-select
332-
(1,58) unexpected-start-tag-in-select
333-
(1,66) unexpected-end-tag-in-select
334-
(1,69) unexpected-start-tag-in-select
335-
(1,80) unexpected-table-element-end-tag-in-select-in-table
336325
#document
337326
| <!DOCTYPE html>
338327
| <html>
339328
| <head>
340329
| <body>
341330
| <select>
342-
| "foobarbaz"
331+
| <math math>
332+
| <math mi>
333+
| "foo"
334+
| <math mi>
335+
| "bar"
336+
| <p>
337+
| "baz"
343338
| <table>
344339
| <p>
345340
| "quux"

tree-construction/tests_innerHTML_1.dat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -790,29 +790,29 @@ select
790790
#data
791791
<input><option>
792792
#errors
793-
(1,7): unexpected-input-in-select
794793
#document-fragment
795794
select
796795
#document
796+
| <input>
797797
| <option>
798798

799799
#data
800800
<keygen><option>
801801
#errors
802-
(1,8): unexpected-input-in-select
803802
#document-fragment
804803
select
805804
#document
805+
| <keygen>
806806
| <option>
807807

808808
#data
809809
<textarea><option>
810810
#errors
811-
(1,10): unexpected-input-in-select
812811
#document-fragment
813812
select
814813
#document
815-
| <option>
814+
| <textarea>
815+
| "<option>"
816816

817817
#data
818818
</html><!--abc-->

0 commit comments

Comments
 (0)