DOM 3 LS testsuite bugs

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 ?

Goodbye.

Received on Thursday, 14 September 2006 04:00:09 UTC