This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
From http://lists.w3.org/Archives/Public/www-dom-ts/2003Jun/0008.htmlDate: Mon, 23 Jun 2003 21:06:04 +0000 From: Andrew Clover <and-w3@doxdesk.com> To: www-dom-ts@w3.org Message-ID: <20030623210604.GA9663@doxdesk.com> Subject: Test suite problems Evening, I've just run my implementation through the current CVS's L2 tests (including ibmtests - what is the status of these?), and unfortunately this seems to have turned up a few more test suite problems. Here are my notes: level1/core/hc_nodeinsertbeforeinvalidnodetype This can generate a NOT_FOUND_ERR as well as a HIERARCHY_REQUEST_ERR. getElementsByTagName("p") will select elements that aren't inside the root node, so can't be used as a refChild on a root node insertBefore. level1/core/hc_nodereplacechildinvalidnodetype Can also generate NOT_FOUND_ERR for the same reason. level2/core/internalSubset01 Forgets to actually test anything, and the description text is nonsense. level2/core/namednodemapgetnameditemns01 Entities and notations cannot be dealt with like this using Level 2 NS methods, they are defined as having null localNames. Implementations should return null; the subsequent nodeName calls then cause null dereference exceptions. level2/core/namednodemapremovenameditemns05 Same entities/notations problem. Hence removeNamedItemNS can raise NOT_FOUND_ERROR. level2/core/namednodemapsetnameditemns03 The attribute is already used by another element in a different document; the implementation could raise INUSE_ATTRIBUTE_ERR as well as WRONG_DOCUMENT_ERR. level2/core/namednodemapsetnameditemns05 Fails to get entity/notation for same reasons before. Passing it to setNamedItemNS could generate an implementation-defined null-related exception as well as NO_MODIFICATION_ALLOWED_ERR. level2/core/namednodemapsetnameditemns10 Same again, null error possible. level2/core/prefix06 There is a ':' in the prefix name, so this could cause a NAMESPACE_ERR as well as an INVALID_CHARACTER_ERR. level2/core/removeNamedItemNS03 Tries to remove a non-existant attribute, so could generate NOT_FOUND_ERR as well as NO_MODIFICATION_ALLOWED_ERR. level2/core/setNamedItemNS04 The namespaceURI doesn't match that of the attribute in the entity reference, so getNamedItemNS returns null, and an implementation-defined null-related exception can be raised as well as NO_MODIFICATION_ALLOWED_ERR. -- Andrew Clover mailto:and@doxdesk.com http://www.doxdesk.com/
I've made some changes to the following tests and committed them to the test suite. * level2/core/internalSubset01 internalSubset01 has been modifed to test for a null value that could be returned by the internalSubset() method if an internal subset does not exist as per the DOM Level 2 errata. staff2.xml and staff2.dtd have been committed to the test suite for this test since there were not any test files that contained a DOCTYPE that was empty. An additional test will be added at a later date to test for an internal subset that is not null. * level2/core/prefix06 The ':' was removed from the prefix name. * level2/core/setNamedItemNS04 The namespaceURI was changed to match that of the attribute in the entity reference. Rick Rivello
The following test has been corrected and tries to remove an existing attribute. /level2/core/removeNamedItemNS03
I'm still seeing a ':' in the prefix name in level2/core/prefix06. Suggest replace line 46: <prefix obj="employeeNode" value=""pre^fix xmlns='http://www.nist. gov'""/> with: <prefix obj="employeeNode" value=""pre^fix xmlns='http//www.nist. gov'""/> The namespaceURI in level2/core/setNamedItemNS04 still doesn't quite match for me either - the attribute it is getting is a namespace declaration whose *value* is "www.xyz.com", not its namespaceURI. Suggest replace line 40: <var name="namespaceURI" type="DOMString" value=""www.xyz.com""/> with: <var name="namespaceURI" type="DOMString" value=""http://www.w3. org/2000/xmlns/""/> Here are some more patches for the other bits... for level2/core/namednodemapgetnameditemns01 and namednodemapsetnameditemns05, suggest replace lines 48-49 with non-NS versions, and same for line 52-53 in namednodemapsetnameditemns10: <getNamedItem var="entity" obj="entities" name='"ent1"'/> <getNamedItem var="notation" obj="notations" name='"notation1"'/> level2/core/namednodemapremovenameditemns05 is a bit more messed up in current CVS, as it is also putting the entity and notation the wrong way round. The meat of this test should probably be: <getNamedItem var="entity" obj="entities" name='"ent1"'/> <getNamedItem var="notation" obj="notations" name='"notation1"'/> <assertDOMException id="namednodemapremovenameditemns05_entities"> <NO_MODIFICATION_ALLOWED_ERR> <removeNamedItem var="removedNode" obj="entities" name='"ent1"'/> </NO_MODIFICATION_ALLOWED_ERR> </assertDOMException> <assertDOMException id="namednodemapremovenameditemns05_notations"> <NO_MODIFICATION_ALLOWED_ERR> <removeNamedItem var="removedNode" obj="notations" name='"notation1"'/> </NO_MODIFICATION_ALLOWED_ERR> </assertDOMException> level2/core/namednodemapsetnameditemns03, suggest replace line 57: <getNamedItemNS var="attr" obj="attributesAlt" namespaceURI="nullNS" localName='"street"'/> with: <createAttributeNS var="attr" obj="docAlt" namespaceURI="nullNS" qualifiedName='"street"'/> to avoid the InuseAttribute error. level2/core/nodegetownerdocument02 seems to contain a new bug, line 42: <var name="nullID" type="DOMString" isNull="true"/> suggest this should be: <var name="nullNS" type="DOMString" isNull="true"/> Finally there are still a couple of issues in L1. level1/core/hc_nodeinsertbeforeinvalidnodetype, line 47: <getElementsByTagName interface="Document" obj="doc" tagname='"p"' var="elementList"/> selects an element that is not a child of the root node. Suggest changing the parent node for the subsequent test: <var name="bodyNode" type="Node"/> ... <parentNode interface="Node" obj="refChild" var="bodyNode"/> <assertDOMException id="throw_HIERARCHY_REQUEST_ERR"> <HIERARCHY_REQUEST_ERR> <insertBefore var="insertedNode" obj="bodyNode" newChild="newChild" refChild="refChild"/> </HIERARCHY_REQUEST_ERR> </assertDOMException> Similarly for nodereplacechildinvalidnodetype.
Corrected level2/core/prefix06 and level2/core/setNamedItemNS04 as per comments listed above.
Closing and moving the last remaining unfixed issues to separate items: bug 406, bug 407, bug 408.