Skip to content

Commit

Permalink
Update tests for relaxed <select> parser
Browse files Browse the repository at this point in the history
This PR updates the tree-construction dat files for the HTML change
which will allow additional tags within <select>:
whatwg/html#10557
  • Loading branch information
josepharhar committed Oct 11, 2024
1 parent a9f4496 commit 87db59f
Show file tree
Hide file tree
Showing 10 changed files with 101 additions and 121 deletions.
2 changes: 1 addition & 1 deletion tree-construction/menuitem-element.dat
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,13 @@
#data
<!DOCTYPE html><select><menuitem></select>
#errors
33: Stray start tag “menuitem”.
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <select>
| <menuitem>

#data
<!DOCTYPE html><option><menuitem>
Expand Down
28 changes: 13 additions & 15 deletions tree-construction/tests1.dat
Original file line number Diff line number Diff line change
Expand Up @@ -355,19 +355,18 @@ Line1<br>Line2<br>Line3<br>Line4
#data
<select><b><option><select><option></b></select>X
#errors
(1,8): expected-doctype-but-got-start-tag
(1,11): unexpected-start-tag-in-select
(1,27): unexpected-select-in-select
(1,39): unexpected-end-tag
(1,48): unexpected-end-tag
#document
| <html>
| <head>
| <body>
| <select>
| <option>
| <option>
| "X"
| <b>
| <option>
| <b>
| <select>
| <b>
| <option>
| "X"

#data
<a><table><td><a><table></table><a></tr><a></table><b>X</b>C<a>Y
Expand Down Expand Up @@ -1532,18 +1531,17 @@ Line1<br>Line2<br>Line3<br>Line4
#data
<select><b><option><select><option></b></select>
#errors
(1,8): expected-doctype-but-got-start-tag
(1,11): unexpected-start-tag-in-select
(1,27): unexpected-select-in-select
(1,39): unexpected-end-tag
(1,48): unexpected-end-tag
#document
| <html>
| <head>
| <body>
| <select>
| <option>
| <option>
| <b>
| <option>
| <b>
| <select>
| <b>
| <option>

#data
<html><head><title></title><body></body></html>
Expand Down
37 changes: 16 additions & 21 deletions tree-construction/tests10.dat
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,25 @@
#data
<!DOCTYPE html><body><select><svg></svg></select>
#errors
(1,34) unexpected-start-tag-in-select
(1,40) unexpected-end-tag-in-select
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <select>
| <svg svg>

#data
<!DOCTYPE html><body><select><option><svg></svg></option></select>
#errors
(1,42) unexpected-start-tag-in-select
(1,48) unexpected-end-tag-in-select
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <select>
| <option>
| <svg svg>

#data
<!DOCTYPE html><body><table><svg></svg></table>
Expand Down Expand Up @@ -261,13 +259,6 @@
#data
<!DOCTYPE html><body><table><tr><td><select><svg><g>foo</g><g>bar</g><p>baz</table><p>quux
#errors
(1,49) unexpected-start-tag-in-select
(1,52) unexpected-start-tag-in-select
(1,59) unexpected-end-tag-in-select
(1,62) unexpected-start-tag-in-select
(1,69) unexpected-end-tag-in-select
(1,72) unexpected-start-tag-in-select
(1,83) unexpected-table-element-end-tag-in-select-in-table
#document
| <!DOCTYPE html>
| <html>
Expand All @@ -278,28 +269,32 @@
| <tr>
| <td>
| <select>
| "foobarbaz"
| <svg svg>
| <svg g>
| "foo"
| <svg g>
| "bar"
| <p>
| "baz"
| <p>
| "quux"

#data
<!DOCTYPE html><body><table><select><svg><g>foo</g><g>bar</g><p>baz</table><p>quux
#errors
(1,36) unexpected-start-tag-implies-table-voodoo
(1,41) unexpected-start-tag-in-select
(1,44) unexpected-start-tag-in-select
(1,51) unexpected-end-tag-in-select
(1,54) unexpected-start-tag-in-select
(1,61) unexpected-end-tag-in-select
(1,64) unexpected-start-tag-in-select
(1,75) unexpected-table-element-end-tag-in-select-in-table
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <select>
| "foobarbaz"
| <svg svg>
| <svg g>
| "foo"
| <svg g>
| "bar"
| <p>
| "baz"
| <table>
| <p>
| "quux"
Expand Down
15 changes: 4 additions & 11 deletions tree-construction/tests18.dat
Original file line number Diff line number Diff line change
Expand Up @@ -227,34 +227,27 @@
#data
<!doctype html><select><plaintext></plaintext>X
#errors
34: Stray start tag “plaintext”.
46: Stray end tag “plaintext”.
47: End of file seen and there were open elements.
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <select>
| "X"
| <plaintext>
| "</plaintext>X"

#data
<!doctype html><table><select><plaintext>a<caption>b
#errors
30: Start tag “select” seen in “table”.
41: Stray start tag “plaintext”.
51: “caption” start tag with “select” open.
52: End of file seen and there were open elements.
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <select>
| "a"
| <plaintext>
| "a<caption>b"
| <table>
| <caption>
| "b"

#data
<!doctype html><template><plaintext>a</template>b
Expand Down
4 changes: 2 additions & 2 deletions tree-construction/tests2.dat
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,6 @@
#data
<!DOCTYPE html><select><optgroup><option></optgroup><option><select><option>
#errors
(1,68): unexpected-select-in-select
#document
| <!DOCTYPE html>
| <html>
Expand All @@ -510,7 +509,8 @@
| <optgroup>
| <option>
| <option>
| <option>
| <select>
| <option>

#data
<!DOCTYPE html><select><optgroup><option><optgroup>
Expand Down
13 changes: 5 additions & 8 deletions tree-construction/tests7.dat
Original file line number Diff line number Diff line change
Expand Up @@ -200,27 +200,26 @@ X</listing>
#data
<!doctype html><select><input>X
#errors
(1,30): unexpected-input-in-select
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <select>
| <input>
| "X"
| <input>
| "X"

#data
<!doctype html><select><select>X
#errors
(1,31): unexpected-select-in-select
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <select>
| "X"
| <select>
| "X"

#data
<!doctype html><table><input type=hidDEN></table>
Expand Down Expand Up @@ -443,11 +442,9 @@ A<table><tr> B</tr> </em>C</table>
#data
<select><keygen>
#errors
(1,8): expected-doctype-but-got-start-tag
(1,16): unexpected-input-in-select
#document
| <html>
| <head>
| <body>
| <select>
| <keygen>
| <keygen>
37 changes: 16 additions & 21 deletions tree-construction/tests9.dat
Original file line number Diff line number Diff line change
Expand Up @@ -48,27 +48,25 @@
#data
<!DOCTYPE html><body><select><math></math></select>
#errors
(1,35) unexpected-start-tag-in-select
(1,42) unexpected-end-tag-in-select
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <select>
| <math math>

#data
<!DOCTYPE html><body><select><option><math></math></option></select>
#errors
(1,43) unexpected-start-tag-in-select
(1,50) unexpected-end-tag-in-select
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <select>
| <option>
| <math math>

#data
<!DOCTYPE html><body><table><math></math></table>
Expand Down Expand Up @@ -301,13 +299,6 @@
#data
<!DOCTYPE html><body><table><tr><td><select><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux
#errors
(1,50) unexpected-start-tag-in-select
(1,54) unexpected-start-tag-in-select
(1,62) unexpected-end-tag-in-select
(1,66) unexpected-start-tag-in-select
(1,74) unexpected-end-tag-in-select
(1,77) unexpected-start-tag-in-select
(1,88) unexpected-table-element-end-tag-in-select-in-table
#document
| <!DOCTYPE html>
| <html>
Expand All @@ -318,28 +309,32 @@
| <tr>
| <td>
| <select>
| "foobarbaz"
| <math math>
| <math mi>
| "foo"
| <math mi>
| "bar"
| <p>
| "baz"
| <p>
| "quux"

#data
<!DOCTYPE html><body><table><select><math><mi>foo</mi><mi>bar</mi><p>baz</table><p>quux
#errors
(1,36) unexpected-start-tag-implies-table-voodoo
(1,42) unexpected-start-tag-in-select
(1,46) unexpected-start-tag-in-select
(1,54) unexpected-end-tag-in-select
(1,58) unexpected-start-tag-in-select
(1,66) unexpected-end-tag-in-select
(1,69) unexpected-start-tag-in-select
(1,80) unexpected-table-element-end-tag-in-select-in-table
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <select>
| "foobarbaz"
| <math math>
| <math mi>
| "foo"
| <math mi>
| "bar"
| <p>
| "baz"
| <table>
| <p>
| "quux"
Expand Down
8 changes: 4 additions & 4 deletions tree-construction/tests_innerHTML_1.dat
Original file line number Diff line number Diff line change
Expand Up @@ -790,29 +790,29 @@ select
#data
<input><option>
#errors
(1,7): unexpected-input-in-select
#document-fragment
select
#document
| <input>
| <option>

#data
<keygen><option>
#errors
(1,8): unexpected-input-in-select
#document-fragment
select
#document
| <keygen>
| <option>

#data
<textarea><option>
#errors
(1,10): unexpected-input-in-select
#document-fragment
select
#document
| <option>
| <textarea>
| "<option>"

#data
</html><!--abc-->
Expand Down
Loading

0 comments on commit 87db59f

Please sign in to comment.