Files
wordpress/tests/phpunit/data/html5lib-tests/tree-construction/domjs-unsafe.dat
Dennis Snell 3b9aefb06c HTML API: Validate HTML Processor against external test suite from html5lib.
In this patch, the test suite from html5lib validates the tree-construction
steps in the HTML Processor to ensure that they are behaving according to the
HTML specification. This suite of tests is also used by the servo project to
test its html5ever package.

A new test module in the HTML API transforms HTML Processor output to match
the expected tree shape from the external tests. For cases where there are
tests validating behaviors of unsupported HTML tags and constructs, the tests
are marked as skipped. As the HTML API continues to expand its own support,
the number of skipped tests will automatically shrink down towards zero.

Additional tests are skipped through the `SKIP_TEST` array in the test runner.

Fixes #60227.
See #58517.
Props azaozz, costdev, dmsnell, hellofromtonya, jonsurrell, jorbin, swisspidy.



git-svn-id: https://develop.svn.wordpress.org/trunk@58010 602fd350-edb4-49c9-b593-d223f7449a82
2024-04-16 12:06:46 +00:00

609 lines
10 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#data
<svg><![CDATA[foo
bar]]>
#errors
(1,5): expected-doctype-but-got-start-tag
(2,6): expected-closing-tag-but-got-eof
#document
| <html>
| <head>
| <body>
| <svg svg>
| "foo
bar"
#data
<svg><![CDATA[foo
bar]]>
#errors
(1,5): expected-doctype-but-got-start-tag
(2,6): expected-closing-tag-but-got-eof
#document
| <html>
| <head>
| <body>
| <svg svg>
| "foo
bar"
#data
<svg><![CDATA[foo
bar]]>
#errors
(1,5): expected-doctype-but-got-start-tag
(2,6): expected-closing-tag-but-got-eof
#document
| <html>
| <head>
| <body>
| <svg svg>
| "foo
bar"
#data
<script>a=''</script>
#errors
(1,8): expected-doctype-but-got-start-tag
(1,12): invalid-codepoint
#new-errors
(1:12) unexpected-null-character
#document
| <html>
| <head>
| <script>
| "a='<27>'"
| <body>
#data
<script type="data"><!--</script>
#errors
(1,20): expected-doctype-but-got-start-tag
(1,25): invalid-codepoint
#new-errors
(1:25) unexpected-null-character
#document
| <html>
| <head>
| <script>
| type="data"
| "<!--<2D>"
| <body>
#data
<script type="data"><!--foo</script>
#errors
(1,20): expected-doctype-but-got-start-tag
(1,28): invalid-codepoint
#new-errors
(1:28) unexpected-null-character
#document
| <html>
| <head>
| <script>
| type="data"
| "<!--foo<6F>"
| <body>
#data
<script type="data"><!-- foo-</script>
#errors
(1,20): expected-doctype-but-got-start-tag
(1,30): invalid-codepoint
#new-errors
(1:30) unexpected-null-character
#document
| <html>
| <head>
| <script>
| type="data"
| "<!-- foo-<2D>"
| <body>
#data
<script type="data"><!-- foo--</script>
#errors
(1,20): expected-doctype-but-got-start-tag
(1,31): invalid-codepoint
#new-errors
(1:31) unexpected-null-character
#document
| <html>
| <head>
| <script>
| type="data"
| "<!-- foo--<2D>"
| <body>
#data
<script type="data"><!-- foo-
#errors
(1,20): expected-doctype-but-got-start-tag
(1,29): expected-script-data-but-got-eof
(1,29): expected-named-closing-tag-but-got-eof
#new-errors
(1:30) eof-in-script-html-comment-like-text
#document
| <html>
| <head>
| <script>
| type="data"
| "<!-- foo-"
| <body>
#data
<script type="data"><!-- foo-<</script>
#errors
(1,20): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <script>
| type="data"
| "<!-- foo-<"
| <body>
#data
<script type="data"><!-- foo-<S
#errors
(1,20): expected-doctype-but-got-start-tag
(1,31): expected-script-data-but-got-eof
(1,31): expected-named-closing-tag-but-got-eof
#new-errors
(1:32) eof-in-script-html-comment-like-text
#document
| <html>
| <head>
| <script>
| type="data"
| "<!-- foo-<S"
| <body>
#data
<script type="data"><!-- foo-</SCRIPT>
#errors
(1,20): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <script>
| type="data"
| "<!-- foo-"
| <body>
#data
<script type="data"><!--<p></script>
#errors
(1,20): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <script>
| type="data"
| "<!--<p>"
| <body>
#data
<script type="data"><!--<script></script></script>
#errors
(1,20): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <script>
| type="data"
| "<!--<script></script>"
| <body>
#data
<script type="data"><!--<script></script></script>
#errors
(1,20): expected-doctype-but-got-start-tag
(1,33): invalid-codepoint
#new-errors
(1:33) unexpected-null-character
#document
| <html>
| <head>
| <script>
| type="data"
| "<!--<script><3E></script>"
| <body>
#data
<script type="data"><!--<script>-</script></script>
#errors
(1,20): expected-doctype-but-got-start-tag
(1,34): invalid-codepoint
#new-errors
(1:34) unexpected-null-character
#document
| <html>
| <head>
| <script>
| type="data"
| "<!--<script>-<2D></script>"
| <body>
#data
<script type="data"><!--<script>--</script></script>
#errors
(1,20): expected-doctype-but-got-start-tag
(1,35): invalid-codepoint
#new-errors
(1:35) unexpected-null-character
#document
| <html>
| <head>
| <script>
| type="data"
| "<!--<script>--<2D></script>"
| <body>
#data
<script type="data"><!--<script>---</script></script>
#errors
(1,20): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <script>
| type="data"
| "<!--<script>---</script>"
| <body>
#data
<script type="data"><!--<script></scrip></SCRIPT></script>
#errors
(1,20): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <script>
| type="data"
| "<!--<script></scrip></SCRIPT>"
| <body>
#data
<script type="data"><!--<script></scrip </SCRIPT></script>
#errors
(1,20): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <script>
| type="data"
| "<!--<script></scrip </SCRIPT>"
| <body>
#data
<script type="data"><!--<script></scrip/</SCRIPT></script>
#errors
(1,20): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <script>
| type="data"
| "<!--<script></scrip/</SCRIPT>"
| <body>
#data
<script type="data"></scrip/></script>
#errors
(1,20): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <script>
| type="data"
| "</scrip/>"
| <body>
#data
<script type="data"></scrip ></script>
#errors
(1,20): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <script>
| type="data"
| "</scrip >"
| <body>
#data
<script type="data"><!--</scrip></script>
#errors
(1,20): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <script>
| type="data"
| "<!--</scrip>"
| <body>
#data
<script type="data"><!--</scrip </script>
#errors
(1,20): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <script>
| type="data"
| "<!--</scrip "
| <body>
#data
<script type="data"><!--</scrip/</script>
#errors
(1,20): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <script>
| type="data"
| "<!--</scrip/"
| <body>
#data
<!DOCTYPE html><!DOCTYPE html>
#errors
(1,30): unexpected-doctype
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
#data
<html><!DOCTYPE html>
#errors
(1,6): expected-doctype-but-got-start-tag
(1,21): unexpected-doctype
#document
| <html>
| <head>
| <body>
#data
<html><head><!DOCTYPE html></head>
#errors
(1,6): expected-doctype-but-got-start-tag
(1,27): unexpected-doctype
#document
| <html>
| <head>
| <body>
#data
<html><head></head><!DOCTYPE html>
#errors
(1,6): expected-doctype-but-got-start-tag
(1,34): unexpected-doctype
#document
| <html>
| <head>
| <body>
#data
<body></body><!DOCTYPE html>
#errors
(1,6): expected-doctype-but-got-start-tag
(1,28): unexpected-doctype
#document
| <html>
| <head>
| <body>
#data
<table><!DOCTYPE html></table>
#errors
(1,7): expected-doctype-but-got-start-tag
(1,22): unexpected-doctype
#document
| <html>
| <head>
| <body>
| <table>
#data
<select><!DOCTYPE html></select>
#errors
(1,8): expected-doctype-but-got-start-tag
(1,23): unexpected-doctype
#document
| <html>
| <head>
| <body>
| <select>
#data
<table><colgroup><!DOCTYPE html></colgroup></table>
#errors
(1,7): expected-doctype-but-got-start-tag
(1,32): unexpected-doctype
#document
| <html>
| <head>
| <body>
| <table>
| <colgroup>
#data
<table><colgroup><!--test--></colgroup></table>
#errors
(1,7): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <table>
| <colgroup>
| <!-- test -->
#data
<table><colgroup><html></colgroup></table>
#errors
(1,7): expected-doctype-but-got-start-tag
(1,23): non-html-root
#document
| <html>
| <head>
| <body>
| <table>
| <colgroup>
#data
<table><colgroup> foo</colgroup></table>
#errors
(1,7): expected-doctype-but-got-start-tag
(1,32): foster-parenting-character-in-table
(1,32): foster-parenting-character-in-table
(1,32): foster-parenting-character-in-table
(1,32): unexpected-end-tag
#document
| <html>
| <head>
| <body>
| "foo"
| <table>
| <colgroup>
| " "
#data
<select><!--test--></select>
#errors
(1,8): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <select>
| <!-- test -->
#data
<select><html></select>
#errors
(1,8): expected-doctype-but-got-start-tag
(1,14): non-html-root
#document
| <html>
| <head>
| <body>
| <select>
#data
<frameset><html></frameset>
#errors
(1,10): expected-doctype-but-got-start-tag
(1,16): non-html-root
#document
| <html>
| <head>
| <frameset>
#data
<frameset></frameset><html>
#errors
(1,10): expected-doctype-but-got-start-tag
(1,27): non-html-root
#document
| <html>
| <head>
| <frameset>
#data
<frameset></frameset><!DOCTYPE html>
#errors
(1,10): expected-doctype-but-got-start-tag
(1,36): unexpected-doctype
#document
| <html>
| <head>
| <frameset>
#data
<html><body></body></html><!DOCTYPE html>
#errors
(1,6): expected-doctype-but-got-start-tag
(1,41): unexpected-doctype
#document
| <html>
| <head>
| <body>
#data
<svg><!DOCTYPE html></svg>
#errors
(1,5): expected-doctype-but-got-start-tag
(1,20): unexpected-doctype
#document
| <html>
| <head>
| <body>
| <svg svg>
#data
<svg><font></font></svg>
#errors
(1,5): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <svg svg>
| <svg font>
#data
<svg><font id=foo></font></svg>
#errors
(1,5): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <svg svg>
| <svg font>
| id="foo"
#data
<svg><font size=4></font></svg>
#errors
(1,5): expected-doctype-but-got-start-tag
(1,18): unexpected-html-element-in-foreign-content
(1,31): unexpected-end-tag
#document
| <html>
| <head>
| <body>
| <svg svg>
| <font>
| size="4"
#data
<svg><font color=red></font></svg>
#errors
(1,5): expected-doctype-but-got-start-tag
(1,21): unexpected-html-element-in-foreign-content
(1,34): unexpected-end-tag
#document
| <html>
| <head>
| <body>
| <svg svg>
| <font>
| color="red"
#data
<svg><font font=sans></font></svg>
#errors
(1,5): expected-doctype-but-got-start-tag
#document
| <html>
| <head>
| <body>
| <svg svg>
| <svg font>
| font="sans"