rowIndex inconsistencies in the testsuite

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 26 November 2002 23:51, Philippe Le Hegaret wrote:
> On Tue, 2002-11-26 at 16:29, David Faure wrote:
> > Most of the failing table tests are due to the section reordering issue. I sent
> > a mail to this list about it, but it remained unanswered. The subject line was
> > "Order of table sections". I would be glad if this could trigger some discussion :)
> 
> Looking at [1], it appeared that this issue was closed at:
> http://lists.w3.org/Archives/Public/www-dom/2002OctDec/0044.html
> It seemed like Mozilla and IE are following the same behavior here.

I'm now hitting a problem with rowIndex, which is answered in the above link.
If I understand correctly, the new, and correct behaviour, is that rowIndex
(quoting the DOM spec)
"is in logical order and not in document order. The rowIndex does take into 
account sections (THEAD, TFOOT, or TBODY) within the table, placing THEAD 
rows first in the index, followed by TBODY rows, followed by TFOOT rows."

If that's the case, then I believe the tests HTMLCollection07 and 
HTMLCollection08 have a bug, they expect the wrong value for rowIndex.
(On the other hand HTMLTableRowElement01.html expects the right value,
so there's currently no way to pass all those tests :)  ).

Suggested fixes:
Index: HTMLCollection07.xml
===================================================================
RCS file: /sources/public/2001/DOM-Test-Suite/tests/level2/html/HTMLCollection07.xml,v
retrieving revision 1.2
diff -u -p -r1.2 HTMLCollection07.xml
- --- HTMLCollection07.xml        2002/06/10 17:27:57     1.2
+++ HTMLCollection07.xml        2002/12/16 23:21:08
@@ -44,5 +44,5 @@ See W3C License http://www.w3.org/Consor
 <rows interface="HTMLTableElement" obj="testNode" var="rowsnodeList"/>
 <item interface="HTMLCollection" obj="rowsnodeList" var="rowNode" index="3"/>
 <rowIndex interface="HTMLTableRowElement" obj="rowNode" var="vrowindex"/>
- -<assertEquals actual="vrowindex" expected="3" id="rowIndexLink" ignoreCase="false"/>
+<assertEquals actual="vrowindex" expected="2" id="rowIndexLink" ignoreCase="false"/>
 </test>
Index: HTMLCollection08.xml
===================================================================
RCS file: /sources/public/2001/DOM-Test-Suite/tests/level2/html/HTMLCollection08.xml,v
retrieving revision 1.3
diff -u -p -r1.3 HTMLCollection08.xml
- --- HTMLCollection08.xml        2002/06/10 17:27:57     1.3
+++ HTMLCollection08.xml        2002/12/16 23:21:08
@@ -25,7 +25,7 @@ See W3C License http://www.w3.org/Consor

     Retrieve the first TABLE element and create a HTMLCollection by invoking
     the "rows" attribute.  Access the item in the third ordinal index.  The
- -    resulting rowIndex attribute is examined and should be two.
+    resulting rowIndex attribute is examined and should be one.
 </description>
 <contributor>Rick Rivello</contributor>
 <date qualifier="created">2002-05-01</date>
@@ -44,5 +44,5 @@ See W3C License http://www.w3.org/Consor
 <rows interface="HTMLTableElement" obj="testNode" var="rowsnodeList"/>
 <item interface="HTMLCollection" obj="rowsnodeList" var="rowNode" index="2"/>
 <rowIndex interface="HTMLTableRowElement" obj="rowNode" var="vrowindex"/>
- -<assertEquals actual="vrowindex" expected="2" id="rowIndexLink" ignoreCase="false"/>
+<assertEquals actual="vrowindex" expected="1" id="rowIndexLink" ignoreCase="false"/>
 </test>

- -- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
KOffice-1.2.1 is available - http://download.kde.org/stable/koffice-1.2.1/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9/mAd72KcVAmwbhARAqAIAJ9+26pbJm7HdVpgoWbTxgz7CXTIzACfQeYF
gKFT4R6ik3C31djPQ077E6c=
=ZfhX
-----END PGP SIGNATURE-----

Received on Monday, 16 December 2002 18:22:17 UTC