From 248159cc63965706c08f0b92aa5a41ab819b1c7d Mon Sep 17 00:00:00 2001 From: Rupinder Singh Khokhar Date: Sun, 8 Jun 2014 11:18:42 +0530 Subject: HTMLDocument Element incomplete & test generator minor fix --- include/dom/html/html_document.h | 10 +- src/html/html_document.c | 228 ++++++++++++++++++--- src/html/html_document.h | 7 + test/DOMTSHandler.pm | 3 +- .../testcases/tests/level1/html/HTMLDocument02.xml | 40 ---- .../tests/level1/html/HTMLDocument02.xml.kfail | 40 ++++ .../testcases/tests/level1/html/HTMLDocument03.xml | 40 ---- .../tests/level1/html/HTMLDocument03.xml.kfail | 40 ++++ .../tests/level1/html/HTMLDocument04.xml.kfail | 39 ++++ .../tests/level1/html/HTMLDocument04.xml.notimpl | 39 ---- .../testcases/tests/level1/html/HTMLDocument05.xml | 42 ++++ .../tests/level1/html/HTMLDocument05.xml.notimpl | 42 ---- .../testcases/tests/level1/html/HTMLDocument07.xml | 41 ++++ .../tests/level1/html/HTMLDocument07.xml.notimpl | 41 ---- .../tests/level1/html/HTMLDocument08.xml.kfail | 43 ++++ .../tests/level1/html/HTMLDocument08.xml.notimpl | 42 ---- .../testcases/tests/level1/html/HTMLDocument09.xml | 42 ++++ .../tests/level1/html/HTMLDocument09.xml.notimpl | 42 ---- .../testcases/tests/level1/html/HTMLDocument10.xml | 41 ++++ .../tests/level1/html/HTMLDocument10.xml.notimpl | 41 ---- .../testcases/tests/level1/html/HTMLDocument11.xml | 42 ++++ .../tests/level1/html/HTMLDocument11.xml.notimpl | 42 ---- .../tests/level1/html/HTMLDocument12.xml.kfail | 38 ++++ .../tests/level1/html/HTMLDocument12.xml.notimpl | 38 ---- .../tests/level1/html/HTMLDocument13.xml.kfail | 39 ++++ .../tests/level1/html/HTMLDocument13.xml.notimpl | 39 ---- .../tests/level1/html/HTMLDocument14.xml.kfail | 40 ++++ .../tests/level1/html/HTMLDocument14.xml.notimpl | 40 ---- .../testcases/tests/level1/html/HTMLDocument15.xml | 44 ++++ .../tests/level1/html/HTMLDocument15.xml.notimpl | 44 ---- .../testcases/tests/level1/html/HTMLDocument16.xml | 44 ++++ .../tests/level1/html/HTMLDocument16.xml.notimpl | 44 ---- .../tests/level1/html/HTMLDocument17.xml.kfail | 41 ++++ .../tests/level1/html/HTMLDocument17.xml.notimpl | 41 ---- .../tests/level1/html/HTMLDocument18.xml.kfail | 32 +++ .../tests/level1/html/HTMLDocument18.xml.notimpl | 32 --- .../tests/level1/html/HTMLDocument19.xml.kfail | 51 +++++ .../tests/level1/html/HTMLDocument19.xml.notimpl | 51 ----- .../tests/level1/html/HTMLDocument20.xml.kfail | 51 +++++ .../tests/level1/html/HTMLDocument20.xml.notimpl | 51 ----- .../tests/level1/html/HTMLDocument21.xml.kfail | 60 ++++++ .../tests/level1/html/HTMLDocument21.xml.notimpl | 60 ------ test/testcases/tests/level1/html/doc01.xml | 34 +++ test/testcases/tests/level1/html/doc01.xml.notimpl | 34 --- 44 files changed, 1057 insertions(+), 878 deletions(-) delete mode 100644 test/testcases/tests/level1/html/HTMLDocument02.xml create mode 100644 test/testcases/tests/level1/html/HTMLDocument02.xml.kfail delete mode 100644 test/testcases/tests/level1/html/HTMLDocument03.xml create mode 100644 test/testcases/tests/level1/html/HTMLDocument03.xml.kfail create mode 100644 test/testcases/tests/level1/html/HTMLDocument04.xml.kfail delete mode 100644 test/testcases/tests/level1/html/HTMLDocument04.xml.notimpl create mode 100644 test/testcases/tests/level1/html/HTMLDocument05.xml delete mode 100644 test/testcases/tests/level1/html/HTMLDocument05.xml.notimpl create mode 100644 test/testcases/tests/level1/html/HTMLDocument07.xml delete mode 100644 test/testcases/tests/level1/html/HTMLDocument07.xml.notimpl create mode 100644 test/testcases/tests/level1/html/HTMLDocument08.xml.kfail delete mode 100644 test/testcases/tests/level1/html/HTMLDocument08.xml.notimpl create mode 100644 test/testcases/tests/level1/html/HTMLDocument09.xml delete mode 100644 test/testcases/tests/level1/html/HTMLDocument09.xml.notimpl create mode 100644 test/testcases/tests/level1/html/HTMLDocument10.xml delete mode 100644 test/testcases/tests/level1/html/HTMLDocument10.xml.notimpl create mode 100644 test/testcases/tests/level1/html/HTMLDocument11.xml delete mode 100644 test/testcases/tests/level1/html/HTMLDocument11.xml.notimpl create mode 100644 test/testcases/tests/level1/html/HTMLDocument12.xml.kfail delete mode 100644 test/testcases/tests/level1/html/HTMLDocument12.xml.notimpl create mode 100644 test/testcases/tests/level1/html/HTMLDocument13.xml.kfail delete mode 100644 test/testcases/tests/level1/html/HTMLDocument13.xml.notimpl create mode 100644 test/testcases/tests/level1/html/HTMLDocument14.xml.kfail delete mode 100644 test/testcases/tests/level1/html/HTMLDocument14.xml.notimpl create mode 100644 test/testcases/tests/level1/html/HTMLDocument15.xml delete mode 100644 test/testcases/tests/level1/html/HTMLDocument15.xml.notimpl create mode 100644 test/testcases/tests/level1/html/HTMLDocument16.xml delete mode 100644 test/testcases/tests/level1/html/HTMLDocument16.xml.notimpl create mode 100644 test/testcases/tests/level1/html/HTMLDocument17.xml.kfail delete mode 100644 test/testcases/tests/level1/html/HTMLDocument17.xml.notimpl create mode 100644 test/testcases/tests/level1/html/HTMLDocument18.xml.kfail delete mode 100644 test/testcases/tests/level1/html/HTMLDocument18.xml.notimpl create mode 100644 test/testcases/tests/level1/html/HTMLDocument19.xml.kfail delete mode 100644 test/testcases/tests/level1/html/HTMLDocument19.xml.notimpl create mode 100644 test/testcases/tests/level1/html/HTMLDocument20.xml.kfail delete mode 100644 test/testcases/tests/level1/html/HTMLDocument20.xml.notimpl create mode 100644 test/testcases/tests/level1/html/HTMLDocument21.xml.kfail delete mode 100644 test/testcases/tests/level1/html/HTMLDocument21.xml.notimpl create mode 100644 test/testcases/tests/level1/html/doc01.xml delete mode 100644 test/testcases/tests/level1/html/doc01.xml.notimpl diff --git a/include/dom/html/html_document.h b/include/dom/html/html_document.h index 1f868a5..936ea69 100644 --- a/include/dom/html/html_document.h +++ b/include/dom/html/html_document.h @@ -114,7 +114,7 @@ static inline dom_exception dom_html_document_get_body(dom_html_document *doc, get_body(doc, body); } #define dom_html_document_get_body(d, b) \ - dom_html_document_get_title((dom_html_document *) (d), \ + dom_html_document_get_body((dom_html_document *) (d), \ (struct dom_html_element **) (b)) static inline dom_exception dom_html_document_set_body(dom_html_document *doc, @@ -174,7 +174,7 @@ static inline dom_exception dom_html_document_get_anchors(dom_html_document *doc get_anchors(doc, col); } #define dom_html_document_get_anchors(d, c) \ - dom_html_document_get_title((dom_html_document *) (d), \ + dom_html_document_get_anchors((dom_html_document *) (d), \ (struct dom_html_collection **) (c)) static inline dom_exception dom_html_document_get_cookie(dom_html_document *doc, @@ -184,7 +184,7 @@ static inline dom_exception dom_html_document_get_cookie(dom_html_document *doc, get_cookie(doc, cookie); } #define dom_html_document_get_cookie(d, c) \ - dom_html_document_get_title((dom_html_document *) (d), (c)) + dom_html_document_get_cookie((dom_html_document *) (d), (c)) static inline dom_exception dom_html_document_set_cookie(dom_html_document *doc, dom_string *cookie) @@ -237,8 +237,8 @@ static inline dom_exception dom_html_document_get_elements_by_name(dom_html_docu return ((dom_html_document_vtable *) ((dom_node *) doc)->vtable)-> get_elements_by_name(doc, name, list); } -#define dom_html_document_get_elements_by_name(d, n, l) \ - dom_html_document_get_element_by_name((dom_html_document *) (d), \ +#define dom_html_document_get_element_by_name(d, n, l) \ + dom_html_document_get_elements_by_name((dom_html_document *) (d), \ (n), (struct dom_nodelist **) (l)) #endif diff --git a/src/html/html_document.c b/src/html/html_document.c index 5d68d51..83c4801 100644 --- a/src/html/html_document.c +++ b/src/html/html_document.c @@ -126,16 +126,17 @@ dom_exception _dom_html_document_initialise(dom_html_document *doc, doc->domain = NULL; doc->url = NULL; doc->cookie = NULL; - + doc->body = NULL; + doc->memoised = calloc(sizeof(dom_string *), hds_COUNT); if (doc->memoised == NULL) { error = DOM_NO_MEM_ERR; goto out; } - + #define HTML_DOCUMENT_STRINGS_ACTION(attr,str) \ error = dom_string_create_interned((const uint8_t *) #str, \ - SLEN(#str), &doc->memoised[hds_##attr]); \ + SLEN(#str), &doc->memoised[hds_##attr]); \ if (error != DOM_NO_ERR) { \ goto out; \ } @@ -639,57 +640,193 @@ dom_exception _dom_html_document_get_url(dom_html_document *doc, dom_exception _dom_html_document_get_body(dom_html_document *doc, struct dom_html_element **body) { - UNUSED(doc); - UNUSED(body); + dom_exception exc = DOM_NO_ERR; - return DOM_NOT_SUPPORTED_ERR; + if (doc->body != NULL) { + *body = doc->body; + } else { + dom_element *node; + dom_nodelist *nodes; + uint32_t len; + + exc = dom_document_get_elements_by_tag_name(doc, + doc->memoised[hds_BODY], + &nodes); + if (exc != DOM_NO_ERR) { + return exc; + } + + exc = dom_nodelist_get_length(nodes, &len); + if (exc != DOM_NO_ERR) { + dom_nodelist_unref(nodes); + return exc; + } + + if (len == 0) { + exc = dom_document_get_elements_by_tag_name(doc, + doc->memoised[hds_FRAMESET], + &nodes); + if (exc != DOM_NO_ERR) { + return exc; + } + exc = dom_nodelist_get_length(nodes, &len); + if (exc != DOM_NO_ERR) { + dom_nodelist_unref(nodes); + return exc; + } + if(len == 0) { + dom_nodelist_unref(nodes); + return DOM_NO_ERR; + } + } + + exc = dom_nodelist_item(nodes, 0, (void *) &node); + dom_nodelist_unref(nodes); + if (exc != DOM_NO_ERR) { + return exc; + } + + *body = (dom_html_element *)node; + dom_node_unref(node); + } + + return exc; } dom_exception _dom_html_document_set_body(dom_html_document *doc, struct dom_html_element *body) { - UNUSED(doc); - UNUSED(body); + doc->body = body; + return DOM_NO_ERR; +} - return DOM_NOT_SUPPORTED_ERR; +/** + * Callback for creating the images collection + * + * \param node The dom_node_internal object + * \param ctx The dom_html_document object (void *) + * \return DOM_NO_ERR on success, appropriate dom_exception on failure. + */ +bool images_callback(struct dom_node_internal *node, void *ctx) +{ + if(node->type == DOM_ELEMENT_NODE && + dom_string_caseless_isequal(node->name, + ((dom_html_document *)ctx)->memoised[hds_IMG])) { + return true; + } + return false; } dom_exception _dom_html_document_get_images(dom_html_document *doc, struct dom_html_collection **col) { - UNUSED(doc); - UNUSED(col); + dom_html_document *root; + dom_exception err; + err = dom_document_get_document_element(doc, &root); + if (err != DOM_NO_ERR) + return err; - return DOM_NOT_SUPPORTED_ERR; + return _dom_html_collection_create(doc, (dom_node_internal *) root, + images_callback, doc, col); +} + +bool applet_callback(struct dom_node_internal * node, void *ctx) +{ + if(node->type == DOM_ELEMENT_NODE && + dom_string_caseless_isequal(node->name, + ((dom_html_document *)ctx)->memoised[hds_APPLET])) { + return true; + } + return false; +} +/** + * Callback for creating the applets collection + * + * \param node The dom_node_internal object + * \param ctx The dom_html_document object (void *) + * \return DOM_NO_ERR on success, appropriate dom_exception on failure. + */ +bool applets_callback(struct dom_node_internal *node, void *ctx) +{ + if(node->type == DOM_ELEMENT_NODE && + dom_string_caseless_isequal(node->name, + ((dom_html_document *)ctx)->memoised[hds_OBJECT])) { + uint32_t len = 0; + dom_html_collection *applets; + _dom_html_collection_create(ctx, node, + applet_callback, ctx, &applets); + + dom_html_collection_get_length(applets, &len); + if(len != 0) + return true; + } + return false; } dom_exception _dom_html_document_get_applets(dom_html_document *doc, struct dom_html_collection **col) { - UNUSED(doc); - UNUSED(col); + dom_html_document *root; + dom_exception err; + err = dom_document_get_document_element(doc, &root); + if (err != DOM_NO_ERR) + return err; - return DOM_NOT_SUPPORTED_ERR; + return _dom_html_collection_create(doc, (dom_node_internal *) root, + applets_callback, doc, col); +} + +/** + * Callback for creating the links collection + * + * \param node The dom_node_internal object + * \param ctx The dom_html_document object (void *) + * \return DOM_NO_ERR on success, appropriate dom_exception on failure. + */ +bool links_callback(struct dom_node_internal *node, void *ctx) +{ + if(node->type == DOM_ELEMENT_NODE && + (dom_string_caseless_isequal(node->name, + ((dom_html_document *)ctx)->memoised[hds_A]) || + dom_string_caseless_isequal(node->name, + ((dom_html_document *)ctx)->memoised[hds_AREA])) + ) { + bool has_value = false; + dom_exception err; + + err = dom_element_has_attribute(node, + ((dom_html_document *)ctx)->memoised[hds_href], &has_value); + if(err !=DOM_NO_ERR) + return err; + + if(has_value) + return true; + } + return false; } dom_exception _dom_html_document_get_links(dom_html_document *doc, struct dom_html_collection **col) { - UNUSED(doc); - UNUSED(col); + dom_html_document *root; + dom_exception err; + err = dom_document_get_document_element(doc, &root); + if (err != DOM_NO_ERR) + return err; - return DOM_NOT_SUPPORTED_ERR; + return _dom_html_collection_create(doc, (dom_node_internal *) root, + links_callback, doc, col); } static bool __dom_html_document_node_is_form(dom_node_internal *node, - void *ctx) + void *ctx) { dom_html_document *doc = (dom_html_document *)node->owner; - + UNUSED(ctx); - + return dom_string_caseless_isequal(node->name, - doc->memoised[hds_FORM]); + doc->memoised[hds_FORM]); } dom_exception _dom_html_document_get_forms(dom_html_document *doc, @@ -717,13 +854,43 @@ dom_exception _dom_html_document_get_forms(dom_html_document *doc, return DOM_NO_ERR; } +/** + * Callback for creating the anchors collection + * + * \param node The dom_node_internal object + * \param ctx The dom_html_document object (void *) + * \return DOM_NO_ERR on success, appropriate dom_exception on failure. + */ +bool anchors_callback(struct dom_node_internal *node, void *ctx) +{ + if(node->type == DOM_ELEMENT_NODE && + dom_string_caseless_isequal(node->name, + ((dom_html_document *)ctx)->memoised[hds_A])) { + bool has_value = false; + dom_exception err; + + err = dom_element_has_attribute(node, + ((dom_html_document *)ctx)->memoised[hds_name], &has_value); + if(err !=DOM_NO_ERR) + return err; + + if(has_value) + return true; + } + return false; +} + dom_exception _dom_html_document_get_anchors(dom_html_document *doc, struct dom_html_collection **col) { - UNUSED(doc); - UNUSED(col); + dom_html_document *root; + dom_exception err; + err = dom_document_get_document_element(doc, &root); + if (err != DOM_NO_ERR) + return err; - return DOM_NOT_SUPPORTED_ERR; + return _dom_html_collection_create(doc, (dom_node_internal *) root, + anchors_callback, doc, col); } dom_exception _dom_html_document_get_cookie(dom_html_document *doc, @@ -731,7 +898,7 @@ dom_exception _dom_html_document_get_cookie(dom_html_document *doc, { UNUSED(doc); UNUSED(cookie); - + /*todo implement this after updating client interface */ return DOM_NOT_SUPPORTED_ERR; } @@ -740,7 +907,7 @@ dom_exception _dom_html_document_set_cookie(dom_html_document *doc, { UNUSED(doc); UNUSED(cookie); - + /*todo implement this after updating client interface */ return DOM_NOT_SUPPORTED_ERR; } @@ -748,13 +915,14 @@ dom_exception _dom_html_document_open(dom_html_document *doc) { UNUSED(doc); + /*todo implement this after updating client interface */ return DOM_NOT_SUPPORTED_ERR; } dom_exception _dom_html_document_close(dom_html_document *doc) { UNUSED(doc); - + /*todo implement this after updating client interface */ return DOM_NOT_SUPPORTED_ERR; } @@ -764,6 +932,7 @@ dom_exception _dom_html_document_write(dom_html_document *doc, UNUSED(doc); UNUSED(text); + /*todo implement this after updating client interface */ return DOM_NOT_SUPPORTED_ERR; } @@ -773,6 +942,7 @@ dom_exception _dom_html_document_writeln(dom_html_document *doc, UNUSED(doc); UNUSED(text); + /*todo implement this after _dom_html_document_write */ return DOM_NOT_SUPPORTED_ERR; } @@ -782,7 +952,7 @@ dom_exception _dom_html_document_get_elements_by_name(dom_html_document *doc, UNUSED(doc); UNUSED(name); UNUSED(list); - + /*todo implement after updating core nodelist interface */ return DOM_NOT_SUPPORTED_ERR; } diff --git a/src/html/html_document.h b/src/html/html_document.h index 67250f5..c00529b 100644 --- a/src/html/html_document.h +++ b/src/html/html_document.h @@ -9,6 +9,7 @@ #define dom_internal_html_document_h_ #include +#include #include "core/document.h" @@ -23,6 +24,7 @@ struct dom_html_document { dom_string *domain; /**< HTML document domain */ dom_string *url; /**< HTML document URL */ dom_string *cookie; /**< HTML document cookie */ + dom_html_element *body; /**< HTML BodyElement */ /** Cached strings for html objects to use */ dom_string **memoised; @@ -126,6 +128,11 @@ dom_exception _dom_html_document_create_attribute(dom_document *doc, dom_exception _dom_html_document_create_attribute_ns(dom_document *doc, dom_string *namespace, dom_string *qname, dom_attr **result); +bool images_callback(struct dom_node_internal *node, void *ctx); +bool applets_callback(struct dom_node_internal *node, void *ctx); +bool applet_callback(struct dom_node_internal *node, void *ctx); +bool links_callback(struct dom_node_internal *node, void *ctx); +bool anchors_callback(struct dom_node_internal *node, void *ctx); #define DOM_DOCUMENT_VTABLE_HTML \ _dom_document_get_doctype, \ diff --git a/test/DOMTSHandler.pm b/test/DOMTSHandler.pm index 304ac29..fa71365 100644 --- a/test/DOMTSHandler.pm +++ b/test/DOMTSHandler.pm @@ -91,6 +91,7 @@ our %special_method = ( our %special_attribute = ( namespaceURI => "namespace", + URL => "url", ); our %no_unref = ( @@ -1210,7 +1211,7 @@ sub generate_assertion { $fragment = $ats->{fragment}; } if (exists $ats->{isAbsolute}) { - $isAbsolute = $ats->{isAbsolute}; + $isAbsolute = "\"$ats->{isAbsolute}\""; } print "is_uri_equals($scheme, $path, $host, $file, $name, $query, $fragment, $isAbsolute, $actual)" diff --git a/test/testcases/tests/level1/html/HTMLDocument02.xml b/test/testcases/tests/level1/html/HTMLDocument02.xml deleted file mode 100644 index 24bd58f..0000000 --- a/test/testcases/tests/level1/html/HTMLDocument02.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - -HTMLDocument02 -NIST - - The referrer attribute returns the URI of the page that linked to this - page. - - Retrieve the referrer attribute and examine its value. - -Mary Brady -2002-01-18 - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLDocument02.xml.kfail b/test/testcases/tests/level1/html/HTMLDocument02.xml.kfail new file mode 100644 index 0000000..24bd58f --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLDocument02.xml.kfail @@ -0,0 +1,40 @@ + + + + + + + +HTMLDocument02 +NIST + + The referrer attribute returns the URI of the page that linked to this + page. + + Retrieve the referrer attribute and examine its value. + +Mary Brady +2002-01-18 + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLDocument03.xml b/test/testcases/tests/level1/html/HTMLDocument03.xml deleted file mode 100644 index 97e291d..0000000 --- a/test/testcases/tests/level1/html/HTMLDocument03.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - -HTMLDocument03 -NIST - - The domain attribute specifies the domain name of the server that served - the document, or null if the server cannot be identified by a domain name. - - Retrieve the domain attribute and examine its value. - -Mary Brady -2002-01-18 - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLDocument03.xml.kfail b/test/testcases/tests/level1/html/HTMLDocument03.xml.kfail new file mode 100644 index 0000000..97e291d --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLDocument03.xml.kfail @@ -0,0 +1,40 @@ + + + + + + + +HTMLDocument03 +NIST + + The domain attribute specifies the domain name of the server that served + the document, or null if the server cannot be identified by a domain name. + + Retrieve the domain attribute and examine its value. + +Mary Brady +2002-01-18 + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLDocument04.xml.kfail b/test/testcases/tests/level1/html/HTMLDocument04.xml.kfail new file mode 100644 index 0000000..223d426 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLDocument04.xml.kfail @@ -0,0 +1,39 @@ + + + + + + + +HTMLDocument04 +NIST + + The URL attribute specifies the absolute URI of the document. + + Retrieve the URL attribute and examine its value. + +Mary Brady +2002-01-18 + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLDocument04.xml.notimpl b/test/testcases/tests/level1/html/HTMLDocument04.xml.notimpl deleted file mode 100644 index 223d426..0000000 --- a/test/testcases/tests/level1/html/HTMLDocument04.xml.notimpl +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - -HTMLDocument04 -NIST - - The URL attribute specifies the absolute URI of the document. - - Retrieve the URL attribute and examine its value. - -Mary Brady -2002-01-18 - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLDocument05.xml b/test/testcases/tests/level1/html/HTMLDocument05.xml new file mode 100644 index 0000000..a764b35 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLDocument05.xml @@ -0,0 +1,42 @@ + + + + + + + +HTMLDocument05 +NIST + + The body attribute is the element that contains the content for the + document. + + Retrieve the body attribute and examine its value for the id attribute. + +Mary Brady +2002-01-18 + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLDocument05.xml.notimpl b/test/testcases/tests/level1/html/HTMLDocument05.xml.notimpl deleted file mode 100644 index a764b35..0000000 --- a/test/testcases/tests/level1/html/HTMLDocument05.xml.notimpl +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - -HTMLDocument05 -NIST - - The body attribute is the element that contains the content for the - document. - - Retrieve the body attribute and examine its value for the id attribute. - -Mary Brady -2002-01-18 - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLDocument07.xml b/test/testcases/tests/level1/html/HTMLDocument07.xml new file mode 100644 index 0000000..a08972f --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLDocument07.xml @@ -0,0 +1,41 @@ + + + + + + + +HTMLDocument07 +NIST + + The images attribute returns a collection of all IMG elements in a document. + + Retrieve the images attribute from the document and examine its value. + +Rick Rivello +2002-04-30 + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLDocument07.xml.notimpl b/test/testcases/tests/level1/html/HTMLDocument07.xml.notimpl deleted file mode 100644 index a08972f..0000000 --- a/test/testcases/tests/level1/html/HTMLDocument07.xml.notimpl +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -HTMLDocument07 -NIST - - The images attribute returns a collection of all IMG elements in a document. - - Retrieve the images attribute from the document and examine its value. - -Rick Rivello -2002-04-30 - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLDocument08.xml.kfail b/test/testcases/tests/level1/html/HTMLDocument08.xml.kfail new file mode 100644 index 0000000..f4b3e3d --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLDocument08.xml.kfail @@ -0,0 +1,43 @@ + + + + + + + +HTMLDocument08 +NIST + + The applets attribute returns a collection of all OBJECT elements that + include applets abd APPLET elements in a document. + + Retrieve the applets attribute from the document and examine its value. + +Rick Rivello +2002-04-30 + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLDocument08.xml.notimpl b/test/testcases/tests/level1/html/HTMLDocument08.xml.notimpl deleted file mode 100644 index fcc8147..0000000 --- a/test/testcases/tests/level1/html/HTMLDocument08.xml.notimpl +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - -HTMLDocument08 -NIST - - The applets attribute returns a collection of all OBJECT elements that - include applets abd APPLET elements in a document. - - Retrieve the applets attribute from the document and examine its value. - -Rick Rivello -2002-04-30 - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLDocument09.xml b/test/testcases/tests/level1/html/HTMLDocument09.xml new file mode 100644 index 0000000..037811f --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLDocument09.xml @@ -0,0 +1,42 @@ + + + + + + + +HTMLDocument09 +NIST + + The links attribute returns a collection of all AREA and A elements + in a document with a value for the href attribute. + + Retrieve the links attribute from the document and examine its value. + +Rick Rivello +2002-04-30 + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLDocument09.xml.notimpl b/test/testcases/tests/level1/html/HTMLDocument09.xml.notimpl deleted file mode 100644 index 037811f..0000000 --- a/test/testcases/tests/level1/html/HTMLDocument09.xml.notimpl +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - -HTMLDocument09 -NIST - - The links attribute returns a collection of all AREA and A elements - in a document with a value for the href attribute. - - Retrieve the links attribute from the document and examine its value. - -Rick Rivello -2002-04-30 - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLDocument10.xml b/test/testcases/tests/level1/html/HTMLDocument10.xml new file mode 100644 index 0000000..700cebd --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLDocument10.xml @@ -0,0 +1,41 @@ + + + + + + + +HTMLDocument10 +NIST + + The forms attribute returns a collection of all the forms in a document. + + Retrieve the forms attribute from the document and examine its value. + +Rick Rivello +2002-04-30 + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLDocument10.xml.notimpl b/test/testcases/tests/level1/html/HTMLDocument10.xml.notimpl deleted file mode 100644 index 700cebd..0000000 --- a/test/testcases/tests/level1/html/HTMLDocument10.xml.notimpl +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -HTMLDocument10 -NIST - - The forms attribute returns a collection of all the forms in a document. - - Retrieve the forms attribute from the document and examine its value. - -Rick Rivello -2002-04-30 - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLDocument11.xml b/test/testcases/tests/level1/html/HTMLDocument11.xml new file mode 100644 index 0000000..308131f --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLDocument11.xml @@ -0,0 +1,42 @@ + + + + + + + +HTMLDocument11 +NIST + + The anchors attribute returns a collection of all A elements with values + for the name attribute. + + Retrieve the anchors attribute from the document and examine its value. + +Rick Rivello +2002-04-30 + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLDocument11.xml.notimpl b/test/testcases/tests/level1/html/HTMLDocument11.xml.notimpl deleted file mode 100644 index 308131f..0000000 --- a/test/testcases/tests/level1/html/HTMLDocument11.xml.notimpl +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - -HTMLDocument11 -NIST - - The anchors attribute returns a collection of all A elements with values - for the name attribute. - - Retrieve the anchors attribute from the document and examine its value. - -Rick Rivello -2002-04-30 - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLDocument12.xml.kfail b/test/testcases/tests/level1/html/HTMLDocument12.xml.kfail new file mode 100644 index 0000000..964e70c --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLDocument12.xml.kfail @@ -0,0 +1,38 @@ + + + + + + + +HTMLDocument02 +NIST + + The cookie attribute returns the cookies associated with this document. + + Retrieve the cookie attribute and examine its value. + +Rick Rivello +2002-04-30 + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLDocument12.xml.notimpl b/test/testcases/tests/level1/html/HTMLDocument12.xml.notimpl deleted file mode 100644 index 964e70c..0000000 --- a/test/testcases/tests/level1/html/HTMLDocument12.xml.notimpl +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - -HTMLDocument02 -NIST - - The cookie attribute returns the cookies associated with this document. - - Retrieve the cookie attribute and examine its value. - -Rick Rivello -2002-04-30 - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLDocument13.xml.kfail b/test/testcases/tests/level1/html/HTMLDocument13.xml.kfail new file mode 100644 index 0000000..fc7244b --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLDocument13.xml.kfail @@ -0,0 +1,39 @@ + + + + + + + +HTMLDocument13 +NIST + + The getElementsByName method returns the (possibly empty) collection + of elements whose name value is given by the elementName. + + Retrieve all the elements whose name attribute is "mapid". + Check the length of the nodelist. It should be 1. + +Rick Rivello +2002-07-15 + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLDocument13.xml.notimpl b/test/testcases/tests/level1/html/HTMLDocument13.xml.notimpl deleted file mode 100644 index fc7244b..0000000 --- a/test/testcases/tests/level1/html/HTMLDocument13.xml.notimpl +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - -HTMLDocument13 -NIST - - The getElementsByName method returns the (possibly empty) collection - of elements whose name value is given by the elementName. - - Retrieve all the elements whose name attribute is "mapid". - Check the length of the nodelist. It should be 1. - -Rick Rivello -2002-07-15 - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLDocument14.xml.kfail b/test/testcases/tests/level1/html/HTMLDocument14.xml.kfail new file mode 100644 index 0000000..c41fe14 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLDocument14.xml.kfail @@ -0,0 +1,40 @@ + + + + + + + +HTMLDocument14 +NIST + + The getElementsByName method returns the (possibly empty) collection + of elements whose name value is given by the elementName. + + Retrieve all the elements whose name attribute is "noid". + Check the length of the nodelist. It should be 0 since + the id "noid" does not exist. + +Rick Rivello +2002-07-15 + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLDocument14.xml.notimpl b/test/testcases/tests/level1/html/HTMLDocument14.xml.notimpl deleted file mode 100644 index c41fe14..0000000 --- a/test/testcases/tests/level1/html/HTMLDocument14.xml.notimpl +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - -HTMLDocument14 -NIST - - The getElementsByName method returns the (possibly empty) collection - of elements whose name value is given by the elementName. - - Retrieve all the elements whose name attribute is "noid". - Check the length of the nodelist. It should be 0 since - the id "noid" does not exist. - -Rick Rivello -2002-07-15 - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLDocument15.xml b/test/testcases/tests/level1/html/HTMLDocument15.xml new file mode 100644 index 0000000..e01d4ca --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLDocument15.xml @@ -0,0 +1,44 @@ + + + + + + + +HTMLDocument15 +NIST + + The getElementById method returns the Element whose id is given by + elementId. If no such element exists, returns null. + + Retrieve the element whose id is "mapid". + Check the value of the element. + + +Rick Rivello +2002-07-15 + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLDocument15.xml.notimpl b/test/testcases/tests/level1/html/HTMLDocument15.xml.notimpl deleted file mode 100644 index e01d4ca..0000000 --- a/test/testcases/tests/level1/html/HTMLDocument15.xml.notimpl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -HTMLDocument15 -NIST - - The getElementById method returns the Element whose id is given by - elementId. If no such element exists, returns null. - - Retrieve the element whose id is "mapid". - Check the value of the element. - - -Rick Rivello -2002-07-15 - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLDocument16.xml b/test/testcases/tests/level1/html/HTMLDocument16.xml new file mode 100644 index 0000000..1bb1fa7 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLDocument16.xml @@ -0,0 +1,44 @@ + + + + + + + +HTMLDocument16 +NIST + + The getElementById method returns the Element whose id is given by + elementId. If no such element exists, returns null. + + Retrieve the element whose id is "noid". + The value returned should be null since there are not any elements with + an id of "noid". + + +Rick Rivello +2002-07-15 + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLDocument16.xml.notimpl b/test/testcases/tests/level1/html/HTMLDocument16.xml.notimpl deleted file mode 100644 index 1bb1fa7..0000000 --- a/test/testcases/tests/level1/html/HTMLDocument16.xml.notimpl +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -HTMLDocument16 -NIST - - The getElementById method returns the Element whose id is given by - elementId. If no such element exists, returns null. - - Retrieve the element whose id is "noid". - The value returned should be null since there are not any elements with - an id of "noid". - - -Rick Rivello -2002-07-15 - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLDocument17.xml.kfail b/test/testcases/tests/level1/html/HTMLDocument17.xml.kfail new file mode 100644 index 0000000..6c89504 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLDocument17.xml.kfail @@ -0,0 +1,41 @@ + + + + + + + +HTMLDocument17 +Curt Arnold + +Clears the current document using HTMLDocument.open immediately followed by close. + +2002-03-18 + + + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLDocument17.xml.notimpl b/test/testcases/tests/level1/html/HTMLDocument17.xml.notimpl deleted file mode 100644 index 6c89504..0000000 --- a/test/testcases/tests/level1/html/HTMLDocument17.xml.notimpl +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - -HTMLDocument17 -Curt Arnold - -Clears the current document using HTMLDocument.open immediately followed by close. - -2002-03-18 - - - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLDocument18.xml.kfail b/test/testcases/tests/level1/html/HTMLDocument18.xml.kfail new file mode 100644 index 0000000..7454a15 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLDocument18.xml.kfail @@ -0,0 +1,32 @@ + + + + + + + +HTMLDocument18 +Curt Arnold + +Calls HTMLDocument.close on a document that has not been opened for modification. + +2002-03-18 + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLDocument18.xml.notimpl b/test/testcases/tests/level1/html/HTMLDocument18.xml.notimpl deleted file mode 100644 index 7454a15..0000000 --- a/test/testcases/tests/level1/html/HTMLDocument18.xml.notimpl +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - -HTMLDocument18 -Curt Arnold - -Calls HTMLDocument.close on a document that has not been opened for modification. - -2002-03-18 - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLDocument19.xml.kfail b/test/testcases/tests/level1/html/HTMLDocument19.xml.kfail new file mode 100644 index 0000000..3fa1a81 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLDocument19.xml.kfail @@ -0,0 +1,51 @@ + + + + + + + +HTMLDocument19 +Curt Arnold + +Replaces the current document with a valid HTML document using HTMLDocument.open, write and close. + +2002-03-18 + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLDocument19.xml.notimpl b/test/testcases/tests/level1/html/HTMLDocument19.xml.notimpl deleted file mode 100644 index 3fa1a81..0000000 --- a/test/testcases/tests/level1/html/HTMLDocument19.xml.notimpl +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - -HTMLDocument19 -Curt Arnold - -Replaces the current document with a valid HTML document using HTMLDocument.open, write and close. - -2002-03-18 - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLDocument20.xml.kfail b/test/testcases/tests/level1/html/HTMLDocument20.xml.kfail new file mode 100644 index 0000000..0b03356 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLDocument20.xml.kfail @@ -0,0 +1,51 @@ + + + + + + + +HTMLDocument20 +Curt Arnold + +Replaces the current document with a valid HTML document using HTMLDocument.open, writeln and close. + +2002-03-18 + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLDocument20.xml.notimpl b/test/testcases/tests/level1/html/HTMLDocument20.xml.notimpl deleted file mode 100644 index 0b03356..0000000 --- a/test/testcases/tests/level1/html/HTMLDocument20.xml.notimpl +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - -HTMLDocument20 -Curt Arnold - -Replaces the current document with a valid HTML document using HTMLDocument.open, writeln and close. - -2002-03-18 - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/HTMLDocument21.xml.kfail b/test/testcases/tests/level1/html/HTMLDocument21.xml.kfail new file mode 100644 index 0000000..4942f45 --- /dev/null +++ b/test/testcases/tests/level1/html/HTMLDocument21.xml.kfail @@ -0,0 +1,60 @@ + + + + + + + +HTMLDocument21 +Curt Arnold + +Replaces the current document checks that writeln adds a new line. + +2002-03-18 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/testcases/tests/level1/html/HTMLDocument21.xml.notimpl b/test/testcases/tests/level1/html/HTMLDocument21.xml.notimpl deleted file mode 100644 index 4942f45..0000000 --- a/test/testcases/tests/level1/html/HTMLDocument21.xml.notimpl +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - -HTMLDocument21 -Curt Arnold - -Replaces the current document checks that writeln adds a new line. - -2002-03-18 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/testcases/tests/level1/html/doc01.xml b/test/testcases/tests/level1/html/doc01.xml new file mode 100644 index 0000000..cb0c897 --- /dev/null +++ b/test/testcases/tests/level1/html/doc01.xml @@ -0,0 +1,34 @@ + + + + + + +doc01 +Netscape + +Retrieve the title attribute of HTMLDocument and examine it's value. + +Sivakiran Tummala +2002-02-08 + + + + + + +<assertEquals actual="vtitle" expected='"NIST DOM HTML Test - Anchor"' id="titleLink" ignoreCase="false"/> +</test> diff --git a/test/testcases/tests/level1/html/doc01.xml.notimpl b/test/testcases/tests/level1/html/doc01.xml.notimpl deleted file mode 100644 index cb0c897..0000000 --- a/test/testcases/tests/level1/html/doc01.xml.notimpl +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!-- - -Copyright (c) 2001 World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National de -Recherche en Informatique et en Automatique, Keio University). All -Rights Reserved. This program is distributed under the W3C's Software -Intellectual Property License. This program is distributed in the -hope that it will be useful, but WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. - -See W3C License http://www.w3.org/Consortium/Legal/ for more details. - ---> -<!DOCTYPE test SYSTEM "dom1.dtd"> -<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="doc01"> -<metadata> -<title>doc01 -Netscape - -Retrieve the title attribute of HTMLDocument and examine it's value. - -Sivakiran Tummala -2002-02-08 - - - - - - -<assertEquals actual="vtitle" expected='"NIST DOM HTML Test - Anchor"' id="titleLink" ignoreCase="false"/> -</test> -- cgit v1.2.1