From 2a82a770e694e6aa3677b4d669ecb28446650e21 Mon Sep 17 00:00:00 2001 From: Andrew Sidwell Date: Sat, 12 Jul 2008 12:31:13 +0000 Subject: Add tests to test the "after body" mode in full. svn path=/trunk/hubbub/; revision=4626 --- test/data/tree-construction/INDEX | 1 + test/data/tree-construction/after-body.dat | 129 +++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+) create mode 100644 test/data/tree-construction/after-body.dat (limited to 'test/data') 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 + + +#errors +#comments +Space characters in "after body" should be appended to the body node. +#document +| +| +| +| +| " +" + +#data + +#errors +#comments +Comment tokens in "after body" should be appended to the "html" element. +#document +| +| +| +| +| + +#data + +#errors +Unexpected DOCTYPE declaration. +#comments +DOCTYPE tokens in "after body" should be ignored. +#document +| +| +| +| + +#data + +#errors +Second "html" element not allowed. +#comments +"html" elements in "after body" should be handled like in body and ignored. +#document +| +| +| +| + +#data + +#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 +| +| +| bgcolor="red" +| +| + +#data + +#errors +#comments +End "html" tag should not result in parse error. +#document +| +| +| +| + +#data + +#errors +#comments +EOF should not result in parse error. +#document +| +| +| +| + +#data +xx +#errors +Content after end "body" tag. +#comments +Non-whitespace character tokens should raise parse error, and be processed +as "in body". +#document +| +| +| +| +| "xx" + +#data +

+#errors +Start tag after end "body" tag. +#comments +Non-html start tags should switch insertion mode to "in body" and processed +appropriately. +#document +| +| +| +| +|

+ +#data + +#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 +| +| +| +| + +#data -- cgit v1.2.3