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

DOM 3 LS testsuite bugs

From: Joao Eiras <joao.eiras@gmail.com>
Date: Thu, 14 Sep 2006 04:59:58 +0100
To: www-dom-ts@w3c.org
Message-ID: <op.tfun18d2xl3at9@dragast.mshome.net>

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

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)  
     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 ?

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:34:07 UTC