Sync with latest HTML5lib

This commit is contained in:
Jacques Distler 2007-06-22 03:12:08 -05:00
parent bf572e295f
commit 8e92e4a3ab
41 changed files with 1334 additions and 564 deletions

View file

@ -226,7 +226,6 @@ Line1<br>Line2<br>Line3<br>Line4
<h1>Hello<h2>World
#errors
4: missing document type declaration
13: h2 element start tag implying h1 element end tag
19: mismatched body element end tag (premature end of file?)
#document
| <html>
@ -234,8 +233,8 @@ Line1<br>Line2<br>Line3<br>Line4
| <body>
| <h1>
| "Hello"
| <h2>
| "World"
| <h2>
| "World"
#data
<a><p>X<a>Y</a>Z</p></a>
@ -307,13 +306,18 @@ Line1<br>Line2<br>Line3<br>Line4
#data
<!--><div>--<!-->
#errors
13: unexpected character after two '-' characters while parsing comment
18: missing document type declaration
Incorrect comment token
Missing document type declaration
Incorrect comment token
Unexpected end of file
#document
| <!-- ><div>--<! -->
| <!-- -->
| <html>
| <head>
| <body>
| <div>
| "--"
| <!-- -->
#data
<p><hr></p>
@ -638,10 +642,10 @@ Line1<br>Line2<br>Line3<br>Line4
| <html>
| <head>
| <script>
| " <!-- "
| " <!-- </script> --> "
| " "
| <body>
| "--> EOF"
| "EOF"
#data
<b><p></b>TEST
@ -1248,15 +1252,13 @@ Line1<br>Line2<br>Line3<br>Line4
#data
<style><!--</style><meta><script>--><link></script>
#errors
7: missing document type declaration
missing document type declaration
unexpected EOF
#document
| <html>
| <head>
| <style>
| "<!--"
| <meta>
| <script>
| "--><link>"
| "<!--</style><meta><script>--><link></script>"
| <body>
#data
@ -1305,12 +1307,12 @@ Line1<br>Line2<br>Line3<br>Line4
#document
| <html>
| <head>
| <base>
| <link>
| <meta>
| <title>
| "<p>"
| <body>
| <base>
| <link>
| <meta>
| <p>
#data
@ -1381,12 +1383,11 @@ Line1<br>Line2<br>Line3<br>Line4
6: missing document type declaration
19: unexpected node at end of document
19: unexpected node after body element end tag
19: meta element start tag out of place
#document
| <html>
| <head>
| <meta>
| <body>
| <meta>
| <p>
#data
@ -1430,14 +1431,13 @@ Line1<br>Line2<br>Line3<br>Line4
<h1><h2>
#errors
4: missing document type declaration
8: h2 element start tag implying h1 element end tag
9: mismatched body element end tag (premature end of file?)
#document
| <html>
| <head>
| <body>
| <h1>
| <h2>
| <h2>
#data
<a><p><a></a></p></a>
@ -1630,8 +1630,7 @@ Line1<br>Line2<br>Line3<br>Line4
4: missing document type declaration
15: required tr element start tag implied by unexpected td element start tag
27: unexpected td element end tag implied other end tags
31: h3 element start tag implying h1 element end tag
36: mismatched h1 element end tag
Unexpected EOF
#document
| <html>
| <head>
@ -1642,7 +1641,7 @@ Line1<br>Line2<br>Line3<br>Line4
| <tr>
| <td>
| <h3>
| <h3>
| <h3>
#data
<table><colgroup><col><colgroup><col><col><col><colgroup><col><col><thead><tr><td></table>
@ -1807,6 +1806,7 @@ Line1<br>Line2<br>Line3<br>Line4
| <html>
| <head>
| <body>
| <br>
#data
<table><tr></strong></b></em></i></u></strike></s></blink></tt></pre></big></small></font></select></h1></h2></h3></h4></h5></h6></body></br></a></img></title></span></style></script></table></th></td></tr></frame></area></link></param></hr></input></col></base></meta></basefont></bgsound></embed></spacer></p></dd></dt></caption></colgroup></tbody></tfoot></thead></address></blockquote></center></dir></div></dl></fieldset></listing></menu></ol></ul></li></nobr></wbr></form></button></marquee></object></html></frameset></head></iframe></image></isindex></noembed></noframes></noscript></optgroup></option></plaintext></textarea>
@ -1924,6 +1924,7 @@ Line1<br>Line2<br>Line3<br>Line4
| <html>
| <head>
| <body>
| <br>
| <table>
| <tbody>
| <tr>

View file

@ -1,5 +1,5 @@
#data
<!doctype html>Test
<!DOCTYPE HTML>Test
#errors
#document
| <!DOCTYPE HTML>
@ -63,7 +63,7 @@ frame element can't occur here
| "test"
#data
<!doctype html><frameset>test
<!DOCTYPE HTML><frameset>test
#errors
frameset can't contain text
Unexpected end of file
@ -74,7 +74,7 @@ Unexpected end of file
| <frameset>
#data
<!doctype html><frameset><!doctype html>
<!DOCTYPE HTML><frameset><!DOCTYPE HTML>
#errors
document type declaration can only occur at the start of a document
Expected end tag </frameset>
@ -85,7 +85,7 @@ Expected end tag </frameset>
| <frameset>
#data
<!doctype html><font><p><b>test</font>
<!DOCTYPE HTML><font><p><b>test</font>
#errors
#document
| <!DOCTYPE HTML>
@ -99,7 +99,7 @@ Expected end tag </frameset>
| "test"
#data
<!DOCTYPE htmL><dt><div><dd>
<!DOCTYPE HTML><dt><div><dd>
#errors
#document
| <!DOCTYPE HTML>
@ -151,7 +151,7 @@ Unexpected end of file.
| "</plaintext>"
#data
<!doctype html><table><tr>TEST
<!DOCTYPE HTML><table><tr>TEST
#errors
TEST can't occur in <tr>
Unexpected end of file.
@ -166,7 +166,7 @@ Unexpected end of file.
| <tr>
#data
<!doctype html><body t1=1><body t2=2><body t3=3 t4=4>
<!DOCTYPE HTML><body t1=1><body t2=2><body t3=3 t4=4>
#errors
Unexpected start tag "body"
Unexpected start tag "body"
@ -193,21 +193,18 @@ Unexpected end tag.
| <body>
#data
<!doctype HtML></b test<b &=&amp>X
<!DOCTYPE HTML></b test<b &=&amp>X
#errors
Unexpected < in attribute
End tag contains attributes.
Unexpected end tag.
Named entity didn't end with ;
Unexpected EOF. Missing closing tag.
#document
| <!DOCTYPE HTML>
| <html>
| <head>
| <body>
| <b>
| &="&"
| "X"
| "X"
#data
<!doctypehtml><scrIPt type=text/x-foobar;baz>X</SCRipt
@ -215,7 +212,7 @@ Unexpected EOF. Missing closing tag.
No space after literal DOCTYPE.
Unexpected EOF in (end) tag name
#document
| <!DOCTYPE HTML>
| <!DOCTYPE html>
| <html>
| <head>
| <script>
@ -294,7 +291,7 @@ Unfinished named entity.
#errors
No space after literal DOCTYPE.
#document
| <!DOCTYPE HTML>
| <!DOCTYPE html>
| <html>
| <head>
| <body>
@ -302,7 +299,7 @@ No space after literal DOCTYPE.
| <li>
#data
<!doctypehtml><p><dt>
<!doctypeHTML><p><dt>
#errors
No space after literal DOCTYPE.
#document
@ -314,11 +311,11 @@ No space after literal DOCTYPE.
| <dt>
#data
<!doctypehtml><p><dd>
<!doctypehtmL><p><dd>
#errors
No space after literal DOCTYPE.
#document
| <!DOCTYPE HTML>
| <!DOCTYPE htmL>
| <html>
| <head>
| <body>
@ -331,7 +328,7 @@ No space after literal DOCTYPE.
No space after literal DOCTYPE.
Unexpected EOF.
#document
| <!DOCTYPE HTML>
| <!DOCTYPE html>
| <html>
| <head>
| <body>
@ -339,7 +336,7 @@ Unexpected EOF.
| <form>
#data
<!doctype html><p><b><i><u></p> <p>X
<!DOCTYPE HTML><p><b><i><u></p> <p>X
#errors
Unexpected end tag </p>.
Unexpected end EOF. Missing closing tags.
@ -360,7 +357,7 @@ Unexpected end EOF. Missing closing tags.
| "X"
#data
<!doctype html><p></P>X
<!DOCTYPE HTML><p></P>X
#errors
#document
| <!DOCTYPE HTML>
@ -393,7 +390,7 @@ Invalid entity.
| "&AMp;"
#data
<!doctype html><html><head></head><body><thisISasillyTESTelementNameToMakeSureCrazyTagNamesArePARSEDcorrectLY>
<!DOCTYPE HTML><html><head></head><body><thisISasillyTESTelementNameToMakeSureCrazyTagNamesArePARSEDcorrectLY>
#errors
Unexpected end of file.
#document
@ -404,7 +401,7 @@ Unexpected end of file.
| <thisisasillytestelementnametomakesurecrazytagnamesareparsedcorrectly>
#data
<!doctype html>X</body>X
<!DOCTYPE HTML>X</body>X
#errors
Unexpected non-space characters in the after body phase.
#document
@ -415,7 +412,7 @@ Unexpected non-space characters in the after body phase.
| "XX"
#data
<!doctype html><!-- X
<!DOCTYPE HTML><!-- X
#errors
Unexpected end of file in comment.
#document
@ -426,7 +423,7 @@ Unexpected end of file in comment.
| <body>
#data
<!doctype html><table><caption>test TEST</caption><td>test
<!DOCTYPE HTML><table><caption>test TEST</caption><td>test
#errors
Unexpected <td> in table body phase.
Unexpected end of file.
@ -444,7 +441,7 @@ Unexpected end of file.
| "test"
#data
<!doctype html><select><option><optgroup>
<!DOCTYPE HTML><select><option><optgroup>
#errors
Unexpected end of file. Missing closing tags.
#document
@ -457,7 +454,7 @@ Unexpected end of file. Missing closing tags.
| <optgroup>
#data
<!doctype html><select><optgroup><option></optgroup><option><select><option>
<!DOCTYPE HTML><select><optgroup><option></optgroup><option><select><option>
#errors
Unexpected start tag <select> in <select>.
Unexpected start tag <option>.
@ -472,7 +469,7 @@ Unexpected start tag <option>.
| <option>
#data
<!doctype html><select><optgroup><option><optgroup>
<!DOCTYPE HTML><select><optgroup><option><optgroup>
#errors
Unexpected end of file. Missing closing tags.
#document
@ -486,7 +483,7 @@ Unexpected end of file. Missing closing tags.
| <optgroup>
#data
<!doctype html><font><input><input></font>
<!DOCTYPE HTML><font><input><input></font>
#errors
#document
| <!DOCTYPE HTML>
@ -498,7 +495,7 @@ Unexpected end of file. Missing closing tags.
| <input>
#data
<!DoctypE html><!-- XXX - XXX -->
<!DOCTYPE HTML><!-- XXX - XXX -->
#errors
#document
| <!DOCTYPE HTML>
@ -508,7 +505,7 @@ Unexpected end of file. Missing closing tags.
| <body>
#data
<!DoctypE html><!-- XXX - XXX
<!DOCTYPE HTML><!-- XXX - XXX
#errors
Unexpected EOF in comment.
#document
@ -519,7 +516,7 @@ Unexpected EOF in comment.
| <body>
#data
<!DoctypE html><!-- XXX - XXX - XXX -->
<!DOCTYPE HTML><!-- XXX - XXX - XXX -->
#errors
#document
| <!DOCTYPE HTML>
@ -583,7 +580,7 @@ Unexpected EOF.
| "X"
#data
<!doctype html><body><title>test</body></title>
<!DOCTYPE HTML><body><title>test</body></title>
#errors
Unexpected start tag that belongs in the head.
Expected closing tag after </.
@ -596,7 +593,7 @@ Expected closing tag after </.
| <body>
#data
<!doctype html><body><title>X</title><meta name=z><link rel=foo><style>
<!DOCTYPE HTML><body><title>X</title><meta name=z><link rel=foo><style>
x { content:"</style" } </style>
#errors
Unexpected start tag that belongs in head.
@ -609,17 +606,17 @@ Expected closing tag after </.
| <head>
| <title>
| "X"
| <body>
| <meta>
| name="z"
| <link>
| rel="foo"
| <body>
| <style>
| "
x { content:"</style" } "
#data
<!doctype html><select><optgroup></optgroup></select>
<!DOCTYPE HTML><select><optgroup></optgroup></select>
#errors
#document
| <!DOCTYPE HTML>
@ -642,7 +639,7 @@ No doctype.
| <body>
#data
<!doctype html> <html>
<!DOCTYPE HTML> <html>
#errors
#document
| <!DOCTYPE HTML>
@ -652,7 +649,7 @@ No doctype.
| <body>
#data
<!doctype html><script>
<!DOCTYPE HTML><script>
</script> <title>x</title> </head>
#errors
#document
@ -669,7 +666,7 @@ No doctype.
| <body>
#data
<!doctype html><html><body><html id=x>
<!DOCTYPE HTML><html><body><html id=x>
#errors
duplicate html start tag
#document
@ -680,7 +677,7 @@ duplicate html start tag
| <body>
#data
<!doctype html>X</body><html id="x">
<!DOCTYPE HTML>X</body><html id="x">
#errors
Unexpected html start tag in the after body phase.
html needs to be the first start tag.
@ -693,7 +690,7 @@ html needs to be the first start tag.
| "X"
#data
<!doctype html><head><html id=x>
<!DOCTYPE HTML><head><html id=x>
#errors
html start tag too late
#document
@ -704,7 +701,7 @@ html start tag too late
| <body>
#data
<!doctype html>X</html>X
<!DOCTYPE HTML>X</html>X
#errors
Unexpected non-space characters. Expected end of file.
Unexpected non-space characters in after body phase. Expected end of file.
@ -716,7 +713,7 @@ Unexpected non-space characters in after body phase. Expected end of file.
| "XX"
#data
<!doctype html>X</html>
<!DOCTYPE HTML>X</html>
#errors
#document
| <!DOCTYPE HTML>
@ -726,7 +723,7 @@ Unexpected non-space characters in after body phase. Expected end of file.
| "X "
#data
<!doctype html>X</html><p>X
<!DOCTYPE HTML>X</html><p>X
#errors
Unexpected start tag <p> in trailing end phase.
Unexpected start tag <p> in after body phase.
@ -740,7 +737,7 @@ Unexpected start tag <p> in after body phase.
| "X"
#data
<!doctype html>X<p/x/y/z>
<!DOCTYPE HTML>X<p/x/y/z>
#errors
Solidus (/) incorrectly placed.
Solidus (/) incorrectly placed.
@ -757,7 +754,7 @@ Solidus (/) incorrectly placed.
| z=""
#data
<!doctype html><!--x--
<!DOCTYPE HTML><!--x--
#errors
Unexpected end of file in comment.
#document
@ -768,7 +765,7 @@ Unexpected end of file in comment.
| <body>
#data
<!doctype html><table><tr><td></p></table>
<!DOCTYPE HTML><table><tr><td></p></table>
#errors
Unexpected </p> end tag.
#document

View file

@ -49,23 +49,23 @@ No DOCTYPE
| <script>
#data
<!DOCTYPE html><html><head></head><body><pre>
<!DOCTYPE htML><html><head></head><body><pre>
</pre></body></html>
#errors
#document
| <!DOCTYPE HTML>
| <!DOCTYPE htML>
| <html>
| <head>
| <body>
| <pre>
#data
<!DOCTYPE html><html><head></head><body><pre>
<!DOCTYPE htML><html><head></head><body><pre>
foo</pre></body></html>
#errors
#document
| <!DOCTYPE HTML>
| <!DOCTYPE htML>
| <html>
| <head>
| <body>
@ -74,13 +74,13 @@ foo</pre></body></html>
#data
<!DOCTYPE html><html><head></head><body><pre>
<!DOCTYPE htML><html><head></head><body><pre>
foo
</pre></body></html>
#errors
#document
| <!DOCTYPE HTML>
| <!DOCTYPE htML>
| <html>
| <head>
| <body>
@ -89,11 +89,11 @@ foo
"
#data
<!DOCTYPE html><html><head></head><body><pre>x</pre><span>
<!DOCTYPE htML><html><head></head><body><pre>x</pre><span>
</span></body></html>
#errors
#document
| <!DOCTYPE HTML>
| <!DOCTYPE htML>
| <html>
| <head>
| <body>
@ -104,11 +104,11 @@ foo
"
#data
<!DOCTYPE html><html><head></head><body><pre>x
<!DOCTYPE htML><html><head></head><body><pre>x
y</pre></body></html>
#errors
#document
| <!DOCTYPE HTML>
| <!DOCTYPE htML>
| <html>
| <head>
| <body>
@ -117,11 +117,11 @@ y</pre></body></html>
y"
#data
<!DOCTYPE html><html><head></head><body><pre>x<div>
<!DOCTYPE htML><html><head></head><body><pre>x<div>
y</pre></body></html>
#errors
#document
| <!DOCTYPE HTML>
| <!DOCTYPE htML>
| <html>
| <head>
| <body>
@ -132,20 +132,20 @@ y</pre></body></html>
| y"
#data
<!DOCTYPE html><HTML><META><HEAD></HEAD></HTML>
<!DOCTYPE htML><HTML><META><HEAD></HEAD></HTML>
#errors
#document
| <!DOCTYPE HTML>
| <!DOCTYPE htML>
| <html>
| <head>
| <meta>
| <body>
#data
<!DOCTYPE html><HTML><HEAD><head></HEAD></HTML>
<!DOCTYPE htML><HTML><HEAD><head></HEAD></HTML>
#errors
#document
| <!DOCTYPE HTML>
| <!DOCTYPE htML>
| <html>
| <head>
| <body>
@ -171,23 +171,23 @@ y</pre></body></html>
| <body>
#data
<!DOCTYPE html><textarea>
<!DOCTYPE htML><textarea>
</textarea>
#errors
#document
| <!DOCTYPE HTML>
| <!DOCTYPE htML>
| <html>
| <head>
| <body>
| <textarea>
#data
<!DOCTYPE html><textarea>
<!DOCTYPE htML><textarea>
foo</textarea>
#errors
#document
| <!DOCTYPE HTML>
| <!DOCTYPE htML>
| <html>
| <head>
| <body>
@ -195,11 +195,11 @@ foo</textarea>
| "foo"
#data
<!DOCTYPE html><html><head></head><body><ul><li><div><p><li></ul></body></html>
<!DOCTYPE htML><html><head></head><body><ul><li><div><p><li></ul></body></html>
#errors
Missing end tag (div)
#document
| <!DOCTYPE HTML>
| <!DOCTYPE htML>
| <html>
| <head>
| <body>
@ -208,3 +208,29 @@ Missing end tag (div)
| <div>
| <p>
| <li>
#data
<!doctype html><nobr><nobr><nobr>
#errors
Unexpected end of file.
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <nobr>
| <nobr>
| <nobr>
#data
<!doctype html><nobr><nobr></nobr><nobr>
#errors
Unexpected end of file.
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <nobr>
| <nobr>
| <nobr>

View file

@ -0,0 +1,120 @@
#data
<style> <!-- </style>x
#errors
No DOCTYPE
Unexpected end of file
#document
| <html>
| <head>
| <style>
| " <!-- </style>x"
| <body>
#data
<style> <!-- </style> --> </style>x
#errors
No DOCTYPE
#document
| <html>
| <head>
| <style>
| " <!-- </style> --> "
| <body>
| "x"
#data
<style> <!--> </style>x
#errors
No DOCTYPE
#document
| <html>
| <head>
| <style>
| " <!--> "
| <body>
| "x"
#data
<style> <!---> </style>x
#errors
No DOCTYPE
#document
| <html>
| <head>
| <style>
| " <!---> "
| <body>
| "x"
#data
<iframe> <!---> </iframe>x
#errors
No DOCTYPE
#document
| <html>
| <head>
| <body>
| <iframe>
| " <!---> "
| "x"
#data
<iframe> <!--- </iframe>->x</iframe> --> </iframe>x
#errors
No DOCTYPE
#document
| <html>
| <head>
| <body>
| <iframe>
| " <!--- </iframe>->x</iframe> --> "
| "x"
#data
<script> <!-- </script> --> </script>x
#errors
No DOCTYPE
#document
| <html>
| <head>
| <script>
| " <!-- </script> --> "
| <body>
| "x"
#data
<title> <!-- </title> --> </title>x
#errors
No DOCTYPE
#document
| <html>
| <head>
| <title>
| " <!-- </title> --> "
| <body>
| "x"
#data
<textarea> <!--- </textarea>->x</textarea> --> </textarea>x
#errors
No DOCTYPE
#document
| <html>
| <head>
| <body>
| <textarea>
| " <!--- </textarea>->x</textarea> --> "
| "x"
#data
<style> <!</-- </style>x
#errors
No DOCTYPE
Unexpected end of file
#document
| <html>
| <head>
| <style>
| " <!</-- "
| <body>
| "x"

View file

@ -0,0 +1,29 @@
#data
<!doctype html></head> <head>
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| " "
| <body>
#data
<!doctype html></html> <head>
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| " "
#data
<!doctype html></body><meta>
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <meta>