W3C home > Mailing lists > Public > www-dom-ts@w3.org > April 2002

Re: jsUnit, Cross Browser Support, Asynchronous Data

From: Dimitris Dimitriadis <dimitris@ontologicon.com>
Date: Mon, 1 Apr 2002 18:42:43 +0200
Cc: edward@jsunit.net, www-dom-ts@w3.org
To: bclary@netscape.com (Robert Clary)
Message-Id: <7D74DEDE-458F-11D6-BAAD-000393556882@ontologicon.com>
On a different note, I'd also like to point out that enhancing JsUnit is 
very important to the DOM TS, but we would need to separate the 
projects, at least speaking for the DOM TS group, in order to be able to 
release our updated level 1 TS, which we were aiming at doing fairly 
soon.

Any improvements to JsUnit are of course improvements to the DOM TS, but 
I feel that we should try to concentrate on DOM TS specific issues in 
order to make possible releases quickly. Interdependencies between the 
two are obvious, so we may want to spend some time on dealing with this.

/Dimitris

On Monday, April 1, 2002, at 06:00 , Robert Clary wrote:

> Edward,
>
> I would appreciate your feedback on http://bclary.com/jsunit-
> modified.html
>
> The goal was to allow any browser which supports HTML 4.01 and 
> ECMAScript 262-3rd Edition to be able to use jsUnit.
>
> The use of IE/NS6 only features such as innerHTML have been removed and 
> the requirement to support document.getElementById has also been 
> removed. To do this, I replaced the parts of the user interface which 
> required updating with FRAMEs and used document.write to update the 
> contents instead of HTMLElement.innerHTML. As a part of this 
> modification, the script which updates the user interface has been 
> moved into UiUpdater.js.
>
> This was done to extend the range of browsers which could use jsUnit. 
> This is important for jsUnit's use in the DOM TS.
>
> I also modified the runTest method to allow the calling of an 
> asynchronous preTest() function in test cases before any tests are 
> performed in a test document. The reason for this modification was to 
> allow test pages to load external documents asynchronously before 
> running any tests.
>
> Other modifications include addition of DOCTYPEs, and changes in markup 
> for validation purposes.
>
> The modified jsUnit runs all of the standard tests provided with the 
> original jsUnit 1.2.6 on Internet Explorer 5.5 and Netscape 6/Mozilla 
> 0.9.9+ on Windows 2000. Unfortunately it appears Opera still has 
> problems changing the contents of frames so it times out attempting to 
> load the test documents. I have reports that IE 5.13 on Macintosh does 
> not run the tests. I believe this may be due to the method of test 
> function discovery.  I have not tested with other browsers yet but will 
> be soliciting feedback from the members of the DOM TS community.
>
> Some items I am considering but not have done yet are:
>
> Exposure of timeout parameters through the user interface
>
> Ability to continue to attempt to load a test case even after a time 
> out.
>
> Both of these changes would be useful for when the tests are hosted on 
> the network and the user has a slow connection. I have already done 
> this in the runTest method for the preTest().
>
> I am also considering modifying the means by which test functions in a 
> test document are exposed. While using the convention that the names of 
> all test functions begin with "test" is convenient, it appears that 
> this may limit the ability of other browsers such as IE 5.13 on 
> Macintosh from using jsUnit. It seems that an easy approach would be to 
> expose the test functions in an array which could be queried by jsUnit. 
> This would eliminate this dependency and perhaps allow more browsers to 
> use jsUnit.
>
> I hope that you find these modifications appropriate and would consider 
> working with me to introduce these and perhaps some additional 
> modifications into the official release of jsUnit.
>
> Bob
> -- Bob Clary, bclary@netscape.com
> Technology Evangelist, Netscape Communications
> http://developer.netscape.com/evangelism/
>
Received on Monday, 1 April 2002 11:42:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 6 April 2009 12:58:46 GMT