W3C home > Mailing lists > Public > www-dom-ts@w3.org > September 2006

Re: DOM 3 LS testsuite bugs

From: Curt Arnold <carnold@houston.rr.com>
Date: Thu, 14 Sep 2006 00:15:50 -0500
Message-Id: <463D871F-C44E-4982-9B43-E18049DBAC10@houston.rr.com>
Cc: www-dom-ts@w3c.org
To: Joao Eiras <joao.eiras@gmail.com>


On Sep 13, 2006, at 10:59 PM, Joao Eiras wrote:

>
>
> So far, to my knowledge, Opera is the only browser with LS support.
> So I tried the testsuite in Opera, and all I got was a bunch of  
> errors... so I though...
> Could those be Opera bugs?
> So I started to investigate, and found what tuned out to be a very  
> buggy testsuite, that doesn't work in any browser.
>
> the first problem is located in file
> http://www.w3.org/2004/04/ecmascript/level3/ls/ 
> DOMBuilderFilterTest0.html
>
> A testcase for the problem
>
> var foobar = 'hello';
> function test(){
>    assert(foobar == 'hello');
>    var foobar = 'world';
>    assert(foobar == 'world');
> }
> function assert(b){
>   if(!b){alert('assertion failed');throw "error";}
> }
>
> The problem is, the testsuite defines a global variable 'builder',  
> then accesses it inside the scope of a function, then afterwards it  
> declares a local variable with the same name. Probably they expect  
> for the 1st to refer to the global variable, and the second to the  
> local one...
>
>
> var builder = null;
> /* (...) */
>
> builder = createConfiguredBuilder();
> /* (...) */
>
> function DOMBuilderFilterTest0() {
>    var success;
>     //global variable referenced here, should yield an Object
>     if(checkInitialization(builder, "DOMBuilderFilterTest0") !=  
> null) return;
>     myfilter = new LSParserFilterN10027();
>
> /* (...) */
>     //local variable declared here - initial value is undefined
>     var builder;
>
>
> So please make sure to change the variable names.
>
> Second problem,
> the function getResourceURI in the same file at line 174 is  
> undefined, doesn't exist, in any file or native UA implementation...
> Where does this come from ?


getResourceURI() is a method in the test framework to create a URI  
for the resource files loaded by the tests.  It is defined at line  
1191 in DOMTestSuite.js.

Been quite a while since I looked at this and I will not be able to  
investigate for several days due to other obligations.  It is  
possible that there are either problems in the test definitions (as  
written in XML), in the test transformations (that convert the XML to  
Javascript and Java) or in the supporting code which was not  
identified at the time this particular test suite was developed due  
to the lack of available implementations at the time.
Received on Thursday, 14 September 2006 05:15:56 GMT

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