[imps] Missing tree-construction tests (after Twintsam code-coverage analysis)

Thomas Broyer t.broyer at gmail.com
Mon Mar 10 08:02:20 PDT 2008


I quickly scanned the code-coverage report of tree-construction tests
and here are the parts of Twintsam that are not tested. Note that
Twintsam is not complete (e.g. it does not yet implement the AAA) and
might not be completely in sync with the current draft; this means
that errors in some tests might lead to code never being reached while
the test is actually meant to test this code.

This list is just "FYI", so that people willing to contribute tests
know where to start. Some tests are easy to add, others a bit less
(starting by "what should I do to reach this state?")

If someone wants (and have time) to scan through all the tests to see
if they're still OK wrt the current draft; I suggest reorganizing
tests (e.g. grouped by insertion mode) and moving them into
http://html5.googlecode.com at the same time.

"reset insertion mode":
 - "select" case (fragment case)

"generic CDATA or RCDATA parsing algorithm":
 - end tag when there is a parse error (mismatched end tag)

In "initial":
 - when "force quirks" is true
 - doctype with systemId
 - doctype with publicId toggling quirks mode
 - doctype with publicId toggling quirks mode when systemId is missing
 - doctype with publicId toggling limited quirks mode

In "before html":
 - doctype

In "before head":
 - comment
 - doctype
 - blanks followed by non-blank characters (generally, everywhere
blanks and non-blanks are processed differently)
 - "html" start tag

In "in head":
 - doctype

In "in head noscript":
 - EOF
 - doctype
 - non-blank characters (including blanks followed by non-blank characters)
 - start tag (all cases)
 - end tag (except "noscript")
 -

In "after head":
 - doctype
 - blanks followed by non-blanks
 - "html" start tag

In "in body":
 - doctype
 - "body" start tag with attributes (except fragment case)
 - "body" start tag without attribute (except fragment case)
 - "li", "dd" or "dt" start tag: some permutation in "not a formatting
element except address and div"
 - "dd" or "dt" start tag when there's a parse error
 - "dd" or "dt" start tag (one seems to be covered but not the other)
 - "plaintext" start tag when there's a "p" element in scope
 - "table" start tag when there's a "p" element in scope
 - "noscript" start tag or end tag
 - new HTML5 element's start tag or end tag (when their processing is defined)
 - "body" end tag when there's a parse error when analysing the stack
of open elements
 - "html" end tag when the implied "body" end tag would be ignored
(fragment case)
 - "form" end tag when there's a "form" element in scope and there are
implied end tags to generate
 - "form" end tag when there's no parse error
 - "p" end tag when there's a "p" element in scope and there are
implied end tags to generate
 - same for "li", "dd" or "dt" end tags
 - "li", "dd" or "dt" end tag when there's a parse error
 - "li", "dd" or "dt" end tag when, after generating implied end tags,
there are still other elements in the stack of open elements
 - "hN" end tags
 - "applet", "button", "marquee" or "object" end tag when there's such
an element in scope and there are implied end tags to generate

In "in table":
 - doctype
 - "table" start tag when there's no "table" element in table scope
(fragment case)
 - "input" start tag with type=hidden

In "in caption":
 - "caption" or other listed start tag when there's no "caption"
element in table scope (fragment case)
 - "caption" end tag when there's a "caption" element in table scope
and there are implied end tags to generate

In "in column group":
 - blanks (including blanks followed by non-blank characters)
 - comment
 - doctype
 - "html" start tag
 - "colgroup" end tag when there's a parse error
 - start tag (except "html" and "col") or end tag (except "colgroup"
and "col") when an implied end tag would be ignored (fragment case)

"clear stack back to table body":
 - case when there is a parse error

"clear stack back to table row context":
 - case when there is a parse error

In "in row":
 - "caption" or other listed start tag, or "table" end tag, when an
implied "tr" end tag would be ignored (i.e. there's no "tr" element in
table scope)
 - "body" or other listed end tag being a parse error.

In "in cell":
 - "caption" or other listed start tag when there's no "td" or "th"
element in table scope
 - "td" or "th" end tag when there's such an element in table scope
and there are implied end tags to generate

In "in select":
 - doctype
 - "html" start tag
 - "optgroup" start tag when the "top" element in the stack of open
elements is an "optgroup"
 - "select" end tag when there is a parse error (there's no "select" in scope)
 - an end tag which isn't a "select", "option" or "optgroup"

In "in select in table":
 - never ever reached

In "after body":
 - blanks (including blanks followed by non-blank characters)
 - doctype
 - "html" end element in fragment case

In "in frameset":
 - blanks (including blanks followed by non-blank characters)
 - comment
 - "html" start tag

In "after frameset":
 - doctype

In "after after body":
 - blanks followed by non-blank characters
 - "html" start tag

In "after after frameset":
 - comment
 - non-blank characters
 - any start tag (including "html" start tag)
 - any end tag

-- 
Thomas Broyer



More information about the Implementors mailing list