diff options
author | Andrew Sidwell <andy@entai.co.uk> | 2008-07-12 12:31:13 +0000 |
---|---|---|
committer | Andrew Sidwell <andy@entai.co.uk> | 2008-07-12 12:31:13 +0000 |
commit | 2a82a770e694e6aa3677b4d669ecb28446650e21 (patch) | |
tree | aa81e55b78703d217254b7463081e7521b2df748 /test/data | |
parent | a06c8e695e1199317c571ec8f481900b79314ef0 (diff) | |
download | libhubbub-2a82a770e694e6aa3677b4d669ecb28446650e21.tar.gz libhubbub-2a82a770e694e6aa3677b4d669ecb28446650e21.tar.bz2 |
Add tests to test the "after body" mode in full.
svn path=/trunk/hubbub/; revision=4626
Diffstat (limited to 'test/data')
-rw-r--r-- | test/data/tree-construction/INDEX | 1 | ||||
-rw-r--r-- | test/data/tree-construction/after-body.dat | 129 |
2 files changed, 130 insertions, 0 deletions
diff --git a/test/data/tree-construction/INDEX b/test/data/tree-construction/INDEX index 719e000..ea258b0 100644 --- a/test/data/tree-construction/INDEX +++ b/test/data/tree-construction/INDEX @@ -16,3 +16,4 @@ 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 +after-body.dat Tests "after body" mode diff --git a/test/data/tree-construction/after-body.dat b/test/data/tree-construction/after-body.dat new file mode 100644 index 0000000..acde270 --- /dev/null +++ b/test/data/tree-construction/after-body.dat @@ -0,0 +1,129 @@ +#data +<!DOCTYPE html><body></body> + +#errors +#comments +Space characters in "after body" should be appended to the body node. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| " +" + +#data +<!DOCTYPE html><body></body><!--x--> +#errors +#comments +Comment tokens in "after body" should be appended to the "html" element. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <!-- x --> + +#data +<!DOCTYPE html><body></body><!DOCTYPE html> +#errors +Unexpected DOCTYPE declaration. +#comments +DOCTYPE tokens in "after body" should be ignored. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> + +#data +<!DOCTYPE html><body></body><html> +#errors +Second "html" element not allowed. +#comments +"html" elements in "after body" should be handled like in body and ignored. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> + +#data +<!DOCTYPE html><body></body><html bgcolor="red"> +#errors +Second "html" element not allowed. +#comments +"html" elements in "after body" should be handled like in body and ignored, +but extra attributes should be added to the root "html" element. +#document +| <!DOCTYPE html> +| <html> +| bgcolor="red" +| <head> +| <body> + +#data +<!DOCTYPE html><body></body></html> +#errors +#comments +End "html" tag should not result in parse error. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> + +#data +<!DOCTYPE html><body></body> +#errors +#comments +EOF should not result in parse error. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> + +#data +<!DOCTYPE html><body></body>xx +#errors +Content after end "body" tag. +#comments +Non-whitespace character tokens should raise parse error, and be processed +as "in body". +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| "xx" + +#data +<!DOCTYPE html><body></body><p> +#errors +Start tag after end "body" tag. +#comments +Non-html start tags should switch insertion mode to "in body" and processed +appropriately. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <p> + +#data +<!DOCTYPE html><body></body></dd> +#errors +End tag after end "body" tag. +End tag does not match any opened elements. +#comments +Non-html end tags should switch insertion mode to "in body" and processed +appropriately. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> + +#data |