W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2009

Re: DOM Testing framework?

From: Stewart Brodie <stewart.brodie@antplc.com>
Date: Thu, 16 Jul 2009 18:20:13 +0100
To: <www-dom@w3.org>
Message-ID: <34fc8cadf3dc130c5c4bda75dfbb2d9b7f50cd04@localhost>
Kartikaya Gupta <lists.w3@stakface.com> wrote:

> On Wed, 15 Jul 2009 18:17:33 +0000, Travis Leithead <travil@microsoft.com>
> > Just curious what the current status is of the JSUnit testing framework?
> >
> > http://www.w3.org/DOM/Test/
> >
> > Is this usable for adding new tests?
> >
> > Has the content of the tests been reviewed recently? Are they still an
acceptable set of tests?
> >
> I've been running the Java versions of the L1 and L2 tests against our
> implementation as part of our test suite. For the most part they're
> decent. Some of the tests are incorrect, and they (obviously) don't test
> absolutely everything, but they make a decent starting point. I can
> compile a list of the tests that I've discovered to be wrong if that would
> help.

I would be interested to see your list.

We use the JavaScript versions of them and have also found problems with
some of the tests.  I imported the tests into our source repository and then
have local changes to fix the problems (so that we pass them all :-)  For
example, in DOM Level 2 HTML, HTMLDocument03 (document.domain is correctly
non-empty when you run the tests over HTTP) and HTMLFrameElement09 (the
expected data is the title of the wrong frame) are both wrong.

I also had to change a couple of the tests due to retrospective changes to
the spec after the test suite was written.  The main two I can recall right
now are the test that expects getAttribute() to return an empty string when
the attribute doesn't exist (the spec was changed to say the return is null
in this case), and the Level 2 Events test that verifies that capturing
listeners are not triggered during the at-target phase (which is correct,
but the spec is being changed to match the buggy Firefox behaviour that has
been replicated into Opera & WebKit (iirc) now, so we've had to follow suit
as web content is starting to rely on it - this was discussed a few weeks
ago, either here on on the whatwg mailing list, see archives for details)

Stewart Brodie
Software Engineer
ANT Software Limited
Received on Thursday, 16 July 2009 17:20:55 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:14 UTC