From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../mochitest/html5lib_tree_construction/README.md | 104 + .../html5lib_tree_construction/adoption01.dat | 337 +++ .../html5lib_tree_construction/adoption02.dat | 99 + .../html5lib_tree_construction/comments01.dat | 206 ++ .../html5lib_tree_construction/doctype01.dat | 424 ++++ .../html5lib_tree_construction/domjs-unsafe.dat | Bin 0 -> 9884 bytes .../html5lib_tree_construction/entities01.dat | 792 +++++++ .../html5lib_tree_construction/entities02.dat | 283 +++ .../foreign-fragment.dat | 550 +++++ .../html5lib_license.txt | 21 + .../html5lib_upstream.txt | 11 + .../html5lib_tree_construction/html5test-com.dat | 291 +++ .../html5lib_tree_construction/inbody01.dat | 54 + .../html5lib_tree_construction/isindex.dat | 49 + .../html5lib_tree_construction/main-element.dat | 44 + .../pending-spec-changes-plain-text-unsafe.dat | Bin 0 -> 816 bytes .../pending-spec-changes.dat | 46 + .../plain-text-unsafe.dat | Bin 0 -> 7925 bytes .../mochitest/html5lib_tree_construction/ruby.dat | 298 +++ .../html5lib_tree_construction/scriptdata01.dat | 352 +++ .../scripted/adoption01.dat | 15 + .../html5lib_tree_construction/scripted/ark.dat | 26 + .../scripted/webkit01.dat | 28 + .../html5lib_tree_construction/tables01.dat | 286 +++ .../html5lib_tree_construction/template.dat | 1406 ++++++++++++ .../html5lib_tree_construction/tests1.dat | 1959 ++++++++++++++++ .../html5lib_tree_construction/tests10.dat | 847 +++++++ .../html5lib_tree_construction/tests11.dat | 482 ++++ .../html5lib_tree_construction/tests12.dat | 62 + .../html5lib_tree_construction/tests14.dat | 75 + .../html5lib_tree_construction/tests15.dat | 216 ++ .../html5lib_tree_construction/tests16.dat | 2396 ++++++++++++++++++++ .../html5lib_tree_construction/tests17.dat | 180 ++ .../html5lib_tree_construction/tests18.dat | 322 +++ .../html5lib_tree_construction/tests19.dat | 1454 ++++++++++++ .../html5lib_tree_construction/tests2.dat | 821 +++++++ .../html5lib_tree_construction/tests20.dat | 516 +++++ .../html5lib_tree_construction/tests21.dat | 305 +++ .../html5lib_tree_construction/tests22.dat | 190 ++ .../html5lib_tree_construction/tests23.dat | 168 ++ .../html5lib_tree_construction/tests24.dat | 79 + .../html5lib_tree_construction/tests25.dat | 220 ++ .../html5lib_tree_construction/tests26.dat | 411 ++++ .../html5lib_tree_construction/tests3.dat | 306 +++ .../html5lib_tree_construction/tests4.dat | 58 + .../html5lib_tree_construction/tests5.dat | 197 ++ .../html5lib_tree_construction/tests6.dat | 662 ++++++ .../html5lib_tree_construction/tests7.dat | 402 ++++ .../html5lib_tree_construction/tests8.dat | 149 ++ .../html5lib_tree_construction/tests9.dat | 473 ++++ .../tests_innerHTML_1.dat | 902 ++++++++ .../html5lib_tree_construction/tricky01.dat | 334 +++ .../html5lib_tree_construction/webkit01.dat | 705 ++++++ .../html5lib_tree_construction/webkit02.dat | 116 + 54 files changed, 20729 insertions(+) create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/README.md create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/adoption01.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/adoption02.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/comments01.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/doctype01.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/domjs-unsafe.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/entities01.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/entities02.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/foreign-fragment.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/html5lib_license.txt create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/html5lib_upstream.txt create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/html5test-com.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/inbody01.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/isindex.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/main-element.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/pending-spec-changes-plain-text-unsafe.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/pending-spec-changes.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/plain-text-unsafe.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/ruby.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/scriptdata01.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/scripted/adoption01.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/scripted/ark.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/scripted/webkit01.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tables01.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/template.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests1.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests10.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests11.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests12.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests14.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests15.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests16.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests17.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests18.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests19.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests2.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests20.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests21.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests22.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests23.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests24.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests25.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests26.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests3.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests4.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests5.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests6.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests7.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests8.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests9.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tests_innerHTML_1.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/tricky01.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/webkit01.dat create mode 100644 parser/htmlparser/tests/mochitest/html5lib_tree_construction/webkit02.dat (limited to 'parser/htmlparser/tests/mochitest/html5lib_tree_construction') diff --git a/parser/htmlparser/tests/mochitest/html5lib_tree_construction/README.md b/parser/htmlparser/tests/mochitest/html5lib_tree_construction/README.md new file mode 100644 index 0000000000..be41fa44f8 --- /dev/null +++ b/parser/htmlparser/tests/mochitest/html5lib_tree_construction/README.md @@ -0,0 +1,104 @@ +Tree Construction Tests +======================= + +Each file containing tree construction tests consists of any number of +tests separated by two newlines (LF) and a single newline before the end +of the file. For instance: + + [TEST]LF + LF + [TEST]LF + LF + [TEST]LF + +Where [TEST] is the following format: + +Each test must begin with a string "\#data" followed by a newline (LF). +All subsequent lines until a line that says "\#errors" are the test data +and must be passed to the system being tested unchanged, except with the +final newline (on the last line) removed. + +Then there must be a line that says "\#errors". It must be followed by +one line per parse error that a conformant checker would return. It +doesn't matter what those lines are, although they can't be +"\#document-fragment", "\#document", "\#script-off", "\#script-on", or +empty, the only thing that matters is that there be the right number +of parse errors. + +Then there \*may\* be a line that says "\#document-fragment", which must +be followed by a newline (LF), followed by a string of characters that +indicates the context element, followed by a newline (LF). If the string +of characters starts with "svg ", the context element is in the SVG +namespace and the substring after "svg " is the local name. If the +string of characters starts with "math ", the context element is in the +MathML namespace and the substring after "math " is the local name. +Otherwise, the context element is in the HTML namespace and the string +is the local name. If this line is present the "\#data" must be parsed +using the HTML fragment parsing algorithm with the context element as +context. + +Then there \*may\* be a line that says "\#script-off" or +"\#script-in". If a line that says "\#script-off" is present, the +parser must set the scripting flag to disabled. If a line that says +"\#script-on" is present, it must set it to enabled. Otherwise, the +test should be run in both modes. + +Then there must be a line that says "\#document", which must be followed +by a dump of the tree of the parsed DOM. Each node must be represented +by a single line. Each line must start with "| ", followed by two spaces +per parent node that the node has before the root document node. + +- Element nodes must be represented by a "`<`" then the *tag name + string* "`>`", and all the attributes must be given, sorted + lexicographically by UTF-16 code unit according to their *attribute + name string*, on subsequent lines, as if they were children of the + element node. +- Attribute nodes must have the *attribute name string*, then an "=" + sign, then the attribute value in double quotes ("). +- Text nodes must be the string, in double quotes. Newlines aren't + escaped. +- Comments must be "`<`" then "`!-- `" then the data then "` -->`". +- DOCTYPEs must be "``". +- Processing instructions must be "``". (The HTML parser cannot emit + processing instructions, but scripts can, and the WebVTT to DOM + rules can emit them.) +- Template contents are represented by the string "content" with the + children below it. + +The *tag name string* is the local name prefixed by a namespace +designator. For the HTML namespace, the namespace designator is the +empty string, i.e. there's no prefix. For the SVG namespace, the +namespace designator is "svg ". For the MathML namespace, the namespace +designator is "math ". + +The *attribute name string* is the local name prefixed by a namespace +designator. For no namespace, the namespace designator is the empty +string, i.e. there's no prefix. For the XLink namespace, the namespace +designator is "xlink ". For the XML namespace, the namespace designator +is "xml ". For the XMLNS namespace, the namespace designator is "xmlns +". Note the difference between "xlink:href" which is an attribute in no +namespace with the local name "xlink:href" and "xlink href" which is an +attribute in the xlink namespace with the local name "href". + +If there is also a "\#document-fragment" the bit following "\#document" +must be a representation of the HTML fragment serialization for the +context element given by "\#document-fragment". + +For example: + + #data +

One

Two + #errors + 3: Missing document type declaration + #document + | + | + | + |

+ | "One" + |

+ | "Two" diff --git a/parser/htmlparser/tests/mochitest/html5lib_tree_construction/adoption01.dat b/parser/htmlparser/tests/mochitest/html5lib_tree_construction/adoption01.dat new file mode 100644 index 0000000000..2e1127e517 --- /dev/null +++ b/parser/htmlparser/tests/mochitest/html5lib_tree_construction/adoption01.dat @@ -0,0 +1,337 @@ +#data +

+#errors +(1,3): expected-doctype-but-got-start-tag +(1,10): adoption-agency-1.3 +#document +| +| +| +| +|

+| + +#data +1

23

+#errors +(1,3): expected-doctype-but-got-start-tag +(1,12): adoption-agency-1.3 +#document +| +| +| +| +| "1" +|

+| +| "2" +| "3" + +#data +1 +#errors +(1,3): expected-doctype-but-got-start-tag +(1,17): adoption-agency-1.3 +#document +| +| +| +| +| "1" +|