Patch: HTMLTableElement31.xml tried to add <table> to <table>

HTMLTableElement31 says it will create a new table and append it to the
document. However it instead creates a table and tries to insert it into
another (empty) table. This is apparently forbidden, per the DOM/HTML
spec.

This isn't what the test says it will do, so I think it's a bug in the
test. What about this fix for it?

Index: HTMLTableElement31.xml
===================================================================
RCS file: /sources/public/2001/DOM-Test-Suite/tests/level2/html/HTMLTableElement31.xml,v
retrieving revision 1.4
diff -u -p -r1.4 HTMLTableElement31.xml
--- HTMLTableElement31.xml      2002/08/22 04:53:15     1.4
+++ HTMLTableElement31.xml      2002/09/25 22:53:01
@@ -59,7 +59,7 @@ See W3C License http://www.w3.org/Consor
 <childNodes obj="testNode" var="tableList"/>
 -->
 <createElement obj="doc" var="table" tagName='"table"'/>
-<appendChild obj="testNode" newChild="table" var="tableNode"/>
+<appendChild obj="testNode.parentNode" newChild="table" var="tableNode"/>
 <getElementsByTagName interface="Document" obj="doc" var="nodeList" tagname='"table"'/>
 <assertSize collection="nodeList" size="2" id="tableSize2"/>
 <tBodies interface="HTMLTableElement" obj="tableNode" var="tbodiesnodeList"/>

This adds the new table as a (last) sibling to the existing empty table,
i.e. to a node where we know tables are allowed - and it makes the test
work for me.

David.

Received on Wednesday, 25 September 2002 18:56:51 UTC