diff options
Diffstat (limited to 'test/data')
-rw-r--r-- | test/data/tree-construction/INDEX | 2 | ||||
-rw-r--r-- | test/data/tree-construction/after-after-body.dat | 110 | ||||
-rw-r--r-- | test/data/tree-construction/after-after-frameset.dat | 120 |
3 files changed, 232 insertions, 0 deletions
diff --git a/test/data/tree-construction/INDEX b/test/data/tree-construction/INDEX index cdac5cb..719e000 100644 --- a/test/data/tree-construction/INDEX +++ b/test/data/tree-construction/INDEX @@ -14,3 +14,5 @@ tests9.dat html5lib tests tests10.dat html5lib tests tests11.dat html5lib tests tests12.dat html5lib tests +after-after-body.dat Tests "after after body" mode +after-after-frameset.dat Tests "after after frameset" mode diff --git a/test/data/tree-construction/after-after-body.dat b/test/data/tree-construction/after-after-body.dat new file mode 100644 index 0000000..978bac7 --- /dev/null +++ b/test/data/tree-construction/after-after-body.dat @@ -0,0 +1,110 @@ +#data +<!DOCTYPE html><body></body></html><!--x--> +#errors +#comments +This tests comment insertion in "after after body". +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <!-- x --> + +#data +<!DOCTYPE html><body></body></html><!DOCTYPE foo> +#errors +Unexpected DOCTYPE: <!DOCTYPE foo> +#comments +This tests DOCTYPE ignorance in "after after body". +This handling should be identical to "in body". +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> + +#data +<!DOCTYPE html><body></body></html> + +#errors +#comments +This tests that whitespace in "after after body" is appended to the current +node, which in "after after body" is always the <body> element. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| " +" + +#data +<!DOCTYPE html><body></body></html><html> +#errors +Second <html> tag not allowed. +#comments +This tests that no new <html> tag is added to the document. +This handling should be identical to "in body". +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> + +#data +<!DOCTYPE html><body></body></html><html bgcolor="red"> +#errors +Second <html> tag not allowed. +#comments +This tests that the attributes on <html> tags in "after after body" are added +to the top element on the stack of open elements (e.g. the root <html> tag.) +This handling should be identical to "in body". +#document +| <!DOCTYPE html> +| <html> +| bgcolor="red" +| <head> +| <body> + +#data +<!DOCTYPE html><body></body></html>xxx +#errors +Unexpected text past </html> tag. +#comments +This tests that "anything else" causes switching back to "in body" and +reprocessing of the token. (Character data) +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| "xxx" + +#data +<!DOCTYPE html><body></body></html><table> +#errors +Unexpected tag after </html> tag. +EOF in "in table" mode. +#comments +This tests that "anything else" causes switching back to "in body" and +reprocessing of the token. (Start tag) +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <table> + +#data +<!DOCTYPE html><body></body></html></table> +#errors +Unexpected end tag after </html> tag. +End tag with no matching start tag. +#comments +This tests that "anything else" causes switching back to "in body" and +reprocessing of the token. (End tag) +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> diff --git a/test/data/tree-construction/after-after-frameset.dat b/test/data/tree-construction/after-after-frameset.dat new file mode 100644 index 0000000..e29b585 --- /dev/null +++ b/test/data/tree-construction/after-after-frameset.dat @@ -0,0 +1,120 @@ +#data +<!DOCTYPE html><html><frameset></frameset></html><!--x--> +#errors +#comments +Tests comments in "after after frameset" get appended to the Document object. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> +| <!-- x --> + +#data +<!DOCTYPE html><html><frameset></frameset></html><!DOCTYPE foo> +#errors +Unexpected DOCTYPE: <!DOCTYPE foo> +#comments +This tests DOCTYPE ignorance in "after after frameset". +This handling should be identical to "in body". +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> + +#data +<!DOCTYPE html><html><frameset></frameset></html> + +#errors +#comments +This tests that whitespace in "after after" frameset is appended to the current +node, which in "after after frameset" is always the "html" element. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> +| " +" + +#data +<!DOCTYPE html><frameset></frameset></html><html> +#errors +Second <html> tag not allowed. +#comments +This tests that no new "html" tag is added to the document. +This handling should be identical to "in body". +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> + +#data +<!DOCTYPE html><frameset></frameset></html><html bgcolor="red"> +#errors +Second <html> tag not allowed. +#comments +This tests that the attributes on <html> tags in "after after frameset" are added +to the top element on the stack of open elements (e.g. the root <html> tag.) +This handling should be identical to "in body". +#document +| <!DOCTYPE html> +| <html> +| bgcolor="red" +| <head> +| <frameset> + +#data +<!DOCTYPE html><html><frameset></frameset></html> +#errors +#comments +Test EOF in "after after frameset". +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> + +#data +<!DOCTYPE html><html><frameset></frameset></html>xx +#errors +Text after </html> tag. +Text in frameset. +#comments +Test non-space character in "after after frameset". +This handling should be identical to "in frameset". +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> + +#data +<!DOCTYPE html><html><frameset></frameset></html><table> +#errors +Tag after </html>. +<table> not allowed in <frameset>. +#comments +Test non-html start tag in "after after frameset". +This handling should be identical to "in frameset". +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> + +#data +<!DOCTYPE html><html><frameset></frameset></html></frameset> +#errors +End tag after </html>. +</frameset> when the current node is the root "html" element. +#comments +Test non-html start tag in "after after frameset". +This handling should be identical to "in frameset". +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> |