W3C home > Mailing lists > Public > www-svg@w3.org > May 2010

Incorrect HTML5+SVG tests (Microsoft)

From: Jeff Schiller <codedread@gmail.com>
Date: Wed, 5 May 2010 12:57:31 -0500
Message-ID: <o2pda131fde1005051057of8b77e86ve5f3adf258d58786@mail.gmail.com>
To: Patrick Dengler <patd@microsoft.com>
Cc: www-svg <www-svg@w3.org>
Hi Patrick,

I'm not sure the right person to contact about this.  If there's a
better channel in the future, please let me know.

I was just breezing over the new HTML5 tests that were introduced with
Preview 2 on the IE Testing Center.  I have not gone over every test,
just looked at two: SVG_HTML_Elements_009 and SVG_HTML_Elements_010

The crux of the problem is that childNodes should refer to not just
elements but text nodes.

For instance, if I modify SVG_HTML_Elements_009 from:

            <rect id="rect1" >
                <circle> </circle>


            <rect id="rect1" ><circle> </circle>

and I enable Firefox's HTML5 flag, then the test passes.  Similarly
with SVG_HTML_Elements_010.

So it seems like as the tests are written they are incorrect since
childNodes[0] should refer to the whitespace text node child that is
before the <circle> element, not the <circle> element itself.  I think
this probably highlights a more serious problem in IE9 (childNodes
implementation is not correct), unless I'm completely misunderstanding

For code like this where I really want the elements and not the other
type of DOM nodes, I usually use firstElementChild (from the Element
Traversal spec).

Received on Wednesday, 5 May 2010 17:58:12 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:21 UTC