Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(html/parser): Update html5lib-test (#6156)
- Loading branch information
1 parent
701c3c0
commit 7a38fde
Showing
139 changed files
with
1,711 additions
and
769 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule html5lib-tests
updated
2 files
+54 −0 | tree-construction/template.dat | |
+12 −0 | tree-construction/tests20.dat |
9 changes: 9 additions & 0 deletions
9
crates/swc_html_parser/tests/html5lib-tests-fixture/template_dat/109/dom.rust-debug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
| <template> | ||
| content | ||
| <tr> | ||
| <td> | ||
| "cell" | ||
| <body> |
1 change: 1 addition & 0 deletions
1
crates/swc_html_parser/tests/html5lib-tests-fixture/template_dat/109/input.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!DOCTYPE HTML><template><tr><td>cell</td></tr></template> |
130 changes: 130 additions & 0 deletions
130
crates/swc_html_parser/tests/html5lib-tests-fixture/template_dat/109/output.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
{ | ||
"type": "Document", | ||
"span": { | ||
"start": 1, | ||
"end": 59, | ||
"ctxt": 0 | ||
}, | ||
"mode": "no-quirks", | ||
"children": [ | ||
{ | ||
"type": "DocumentType", | ||
"span": { | ||
"start": 1, | ||
"end": 16, | ||
"ctxt": 0 | ||
}, | ||
"name": "html", | ||
"publicId": null, | ||
"systemId": null, | ||
"raw": "<!DOCTYPE HTML>" | ||
}, | ||
{ | ||
"type": "Element", | ||
"span": { | ||
"start": 0, | ||
"end": 0, | ||
"ctxt": 0 | ||
}, | ||
"tagName": "html", | ||
"namespace": "http://www.w3.org/1999/xhtml", | ||
"attributes": [], | ||
"children": [ | ||
{ | ||
"type": "Element", | ||
"span": { | ||
"start": 0, | ||
"end": 0, | ||
"ctxt": 0 | ||
}, | ||
"tagName": "head", | ||
"namespace": "http://www.w3.org/1999/xhtml", | ||
"attributes": [], | ||
"children": [ | ||
{ | ||
"type": "Element", | ||
"span": { | ||
"start": 16, | ||
"end": 59, | ||
"ctxt": 0 | ||
}, | ||
"tagName": "template", | ||
"namespace": "http://www.w3.org/1999/xhtml", | ||
"attributes": [], | ||
"children": [], | ||
"content": { | ||
"type": "DocumentFragment", | ||
"span": { | ||
"start": 16, | ||
"end": 59, | ||
"ctxt": 0 | ||
}, | ||
"children": [ | ||
{ | ||
"type": "Element", | ||
"span": { | ||
"start": 26, | ||
"end": 48, | ||
"ctxt": 0 | ||
}, | ||
"tagName": "tr", | ||
"namespace": "http://www.w3.org/1999/xhtml", | ||
"attributes": [], | ||
"children": [ | ||
{ | ||
"type": "Element", | ||
"span": { | ||
"start": 30, | ||
"end": 43, | ||
"ctxt": 0 | ||
}, | ||
"tagName": "td", | ||
"namespace": "http://www.w3.org/1999/xhtml", | ||
"attributes": [], | ||
"children": [ | ||
{ | ||
"type": "Text", | ||
"span": { | ||
"start": 34, | ||
"end": 38, | ||
"ctxt": 0 | ||
}, | ||
"data": "cell", | ||
"raw": "cell" | ||
} | ||
], | ||
"content": null, | ||
"isSelfClosing": false | ||
} | ||
], | ||
"content": null, | ||
"isSelfClosing": false | ||
} | ||
] | ||
}, | ||
"isSelfClosing": false | ||
} | ||
], | ||
"content": null, | ||
"isSelfClosing": false | ||
}, | ||
{ | ||
"type": "Element", | ||
"span": { | ||
"start": 0, | ||
"end": 0, | ||
"ctxt": 0 | ||
}, | ||
"tagName": "body", | ||
"namespace": "http://www.w3.org/1999/xhtml", | ||
"attributes": [], | ||
"children": [], | ||
"content": null, | ||
"isSelfClosing": false | ||
} | ||
], | ||
"content": null, | ||
"isSelfClosing": false | ||
} | ||
] | ||
} |
Empty file.
76 changes: 76 additions & 0 deletions
76
crates/swc_html_parser/tests/html5lib-tests-fixture/template_dat/109/span.rust-debug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
|
||
x Document | ||
,-[$DIR/tests/html5lib-tests-fixture/template_dat/109/input.html:1:1] | ||
1 | <!DOCTYPE HTML><template><tr><td>cell</td></tr></template> | ||
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
`---- | ||
|
||
x Child | ||
,-[$DIR/tests/html5lib-tests-fixture/template_dat/109/input.html:1:1] | ||
1 | <!DOCTYPE HTML><template><tr><td>cell</td></tr></template> | ||
: ^^^^^^^^^^^^^^^ | ||
`---- | ||
|
||
x DocumentType | ||
,-[$DIR/tests/html5lib-tests-fixture/template_dat/109/input.html:1:1] | ||
1 | <!DOCTYPE HTML><template><tr><td>cell</td></tr></template> | ||
: ^^^^^^^^^^^^^^^ | ||
`---- | ||
|
||
x Child | ||
|
||
x Element | ||
|
||
x Child | ||
,-[$DIR/tests/html5lib-tests-fixture/template_dat/109/input.html:1:1] | ||
1 | <!DOCTYPE HTML><template><tr><td>cell</td></tr></template> | ||
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
`---- | ||
|
||
x Element | ||
,-[$DIR/tests/html5lib-tests-fixture/template_dat/109/input.html:1:1] | ||
1 | <!DOCTYPE HTML><template><tr><td>cell</td></tr></template> | ||
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
`---- | ||
|
||
x DocumentFragment | ||
,-[$DIR/tests/html5lib-tests-fixture/template_dat/109/input.html:1:1] | ||
1 | <!DOCTYPE HTML><template><tr><td>cell</td></tr></template> | ||
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
`---- | ||
|
||
x Child | ||
,-[$DIR/tests/html5lib-tests-fixture/template_dat/109/input.html:1:1] | ||
1 | <!DOCTYPE HTML><template><tr><td>cell</td></tr></template> | ||
: ^^^^^^^^^^^^^^^^^^^^^^ | ||
`---- | ||
|
||
x Element | ||
,-[$DIR/tests/html5lib-tests-fixture/template_dat/109/input.html:1:1] | ||
1 | <!DOCTYPE HTML><template><tr><td>cell</td></tr></template> | ||
: ^^^^^^^^^^^^^^^^^^^^^^ | ||
`---- | ||
|
||
x Child | ||
,-[$DIR/tests/html5lib-tests-fixture/template_dat/109/input.html:1:1] | ||
1 | <!DOCTYPE HTML><template><tr><td>cell</td></tr></template> | ||
: ^^^^^^^^^^^^^ | ||
`---- | ||
|
||
x Element | ||
,-[$DIR/tests/html5lib-tests-fixture/template_dat/109/input.html:1:1] | ||
1 | <!DOCTYPE HTML><template><tr><td>cell</td></tr></template> | ||
: ^^^^^^^^^^^^^ | ||
`---- | ||
|
||
x Child | ||
,-[$DIR/tests/html5lib-tests-fixture/template_dat/109/input.html:1:1] | ||
1 | <!DOCTYPE HTML><template><tr><td>cell</td></tr></template> | ||
: ^^^^ | ||
`---- | ||
|
||
x Text | ||
,-[$DIR/tests/html5lib-tests-fixture/template_dat/109/input.html:1:1] | ||
1 | <!DOCTYPE HTML><template><tr><td>cell</td></tr></template> | ||
: ^^^^ | ||
`---- |
13 changes: 13 additions & 0 deletions
13
crates/swc_html_parser/tests/html5lib-tests-fixture/template_dat/110/dom.rust-debug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
| <template> | ||
| content | ||
| " " | ||
| <tr> | ||
| " " | ||
| <td> | ||
| "cell" | ||
| " " | ||
| " " | ||
| <body> |
1 change: 1 addition & 0 deletions
1
crates/swc_html_parser/tests/html5lib-tests-fixture/template_dat/110/input.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!DOCTYPE HTML><template> <tr> <td>cell</td> </tr> </template> |
Oops, something went wrong.
7a38fde
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
es/full/minify/libraries/antd
1832264779
ns/iter (± 26573201
)1959122788
ns/iter (± 114346357
)0.94
es/full/minify/libraries/d3
404751114
ns/iter (± 24224896
)426823348
ns/iter (± 15283137
)0.95
es/full/minify/libraries/echarts
1593717215
ns/iter (± 45601964
)1629225489
ns/iter (± 77931279
)0.98
es/full/minify/libraries/jquery
105526324
ns/iter (± 5910146
)121351301
ns/iter (± 5405295
)0.87
es/full/minify/libraries/lodash
143871380
ns/iter (± 22775796
)128926865
ns/iter (± 6642282
)1.12
es/full/minify/libraries/moment
93852280
ns/iter (± 51332303
)65361811
ns/iter (± 3795864
)1.44
es/full/minify/libraries/react
22476718
ns/iter (± 849475
)24593078
ns/iter (± 960018
)0.91
es/full/minify/libraries/terser
373633083
ns/iter (± 15467545
)364703586
ns/iter (± 25018400
)1.02
es/full/minify/libraries/three
612301692
ns/iter (± 46966500
)623310520
ns/iter (± 40559729
)0.98
es/full/minify/libraries/typescript
3578813848
ns/iter (± 135613788
)3808806250
ns/iter (± 71778871
)0.94
es/full/minify/libraries/victory
855505991
ns/iter (± 77620340
)908073823
ns/iter (± 34704156
)0.94
es/full/minify/libraries/vue
176256702
ns/iter (± 12413543
)182892907
ns/iter (± 13043894
)0.96
es/full/codegen/es3
34381
ns/iter (± 1352
)34380
ns/iter (± 2034
)1.00
es/full/codegen/es5
34595
ns/iter (± 2404
)34019
ns/iter (± 1681
)1.02
es/full/codegen/es2015
34400
ns/iter (± 2170
)34098
ns/iter (± 1503
)1.01
es/full/codegen/es2016
36042
ns/iter (± 29512
)34156
ns/iter (± 2289
)1.06
es/full/codegen/es2017
37312
ns/iter (± 10317
)34141
ns/iter (± 2175
)1.09
es/full/codegen/es2018
34417
ns/iter (± 1138
)34570
ns/iter (± 2738
)1.00
es/full/codegen/es2019
34093
ns/iter (± 1730
)34356
ns/iter (± 2413
)0.99
es/full/codegen/es2020
34425
ns/iter (± 3063
)34222
ns/iter (± 1818
)1.01
es/full/all/es3
214741877
ns/iter (± 37064591
)243905038
ns/iter (± 15957710
)0.88
es/full/all/es5
195822870
ns/iter (± 16247609
)230725667
ns/iter (± 16424476
)0.85
es/full/all/es2015
155090964
ns/iter (± 11013410
)182181842
ns/iter (± 14133133
)0.85
es/full/all/es2016
156082469
ns/iter (± 9342338
)183705985
ns/iter (± 19873628
)0.85
es/full/all/es2017
153013247
ns/iter (± 9197242
)155196707
ns/iter (± 8772843
)0.99
es/full/all/es2018
162983817
ns/iter (± 17288485
)151255049
ns/iter (± 8137118
)1.08
es/full/all/es2019
182815746
ns/iter (± 18724098
)151914465
ns/iter (± 10700931
)1.20
es/full/all/es2020
155555979
ns/iter (± 13591650
)148285241
ns/iter (± 10793044
)1.05
es/full/parser
738495
ns/iter (± 42463
)759598
ns/iter (± 37437
)0.97
es/full/base/fixer
26995
ns/iter (± 1929
)27075
ns/iter (± 1262
)1.00
es/full/base/resolver_and_hygiene
94334
ns/iter (± 7712
)95723
ns/iter (± 6090
)0.99
serialization of ast node
207
ns/iter (± 11
)210
ns/iter (± 8
)0.99
serialization of serde
211
ns/iter (± 5
)227
ns/iter (± 5
)0.93
This comment was automatically generated by workflow using github-action-benchmark.