Re: DOM Testing framework?

Kartikaya Gupta <lists.w3@stakface.com> wrote:

> What's wrong with HTMLFrameElement09? It references the frame.html file
> which has a title of "NIST DOM HTML Test - FRAME", which is correct (at
> least in the Java version).

That looks like a fixed version of the test.  This is the change I had to
make:

Index: HTMLFrameElement09.xml
===================================================================
RCS file: /sources/public/2001/DOM-Test-Suite/tests/level2/html/HTMLFrameElement09.xml,v
retrieving revision 1.2
diff -b -c -r1.2 HTMLFrameElement09.xml
*** HTMLFrameElement09.xml      19 Mar 2004 04:05:18 -0000      1.2
--- HTMLFrameElement09.xml      17 Jul 2009 10:01:04 -0000
***************
*** 38,42 ****
  <getElementById interface="Document" obj="doc" var="testNode" elementId='"Frame1"'/>
  <contentDocument interface="HTMLFrameElement" obj="testNode" var="cd"/>
  <title interface="HTMLDocument" obj="cd" var="vtitle"/>
! <assertEquals actual="vtitle" expected='"NIST DOM HTML Test - FRAMESET"' id="titleLink" ignoreCase="false" />
  </test>
--- 38,42 ----
  <getElementById interface="Document" obj="doc" var="testNode" elementId='"Frame1"'/>
  <contentDocument interface="HTMLFrameElement" obj="testNode" var="cd"/>
  <title interface="HTMLDocument" obj="cd" var="vtitle"/>
! <assertEquals actual="vtitle" expected='"NIST DOM HTML Test - FRAME"' id="titleLink" ignoreCase="false" />
  </test>


> > 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),
> 
> Was it? I thought this was going into web DOM core. It's on the issues
> list at http://simon.html5.org/specs/web-dom-core

I thought it was raised as an erratum for DOM Level 2 Core specification.  I
had no idea that there was an independent version of the DOM core
specification being developed, although it looks to be in the very early
stages.  I'm rather alarmed at its statement that it's going to "redefine
some things" from the standard DOM core.


-- 
Stewart Brodie
Software Engineer
ANT Software Limited

Received on Friday, 17 July 2009 10:19:49 UTC