W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2009

Re: [selectors-api] Test Suite Analysis (was: Call for Consensus - Selectors API to Candidate Rec)

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Thu, 26 Feb 2009 22:02:51 +0100
Message-ID: <49A7037B.9040000@lachy.id.au>
To: Travis Leithead <Travis.Leithead@microsoft.com>
Cc: WebApps WG <public-webapps@w3.org>
Travis Leithead wrote:
> I went through the test results in IE8 just to see what the breakdown 
> was and thought I'd pass this info along.

Thanks for this analysis, it's very informative.

> 1 - Actual Selectors API bugs 
> ==================================================================== 
> 288 tests (13.3%)
> 
> (48 tests) Passing null/undefined/[nothing] to 
> querySelector/querySelectorAll (we don't throw an exception here but 
> should). Note, throwing an exception would move these tests into the 
> "WebIDL binding dependencies" category based on the test case design.

Note that with the recent change to the handling of null and undefined, 
IE's behaviour is actually correct because it stringifies them to "null" 
and "undefined".

As for calling them without passing any parameters, I'm not exactly sure 
whether or not an exception should be thrown.  The current behaviour of 
browsers is:

* Opera and Gecko throw exceptions due to the wrong number of arguments
* IE behaves as if null was passed, stringifies to "null"
* WebKit behaves as if undefined was passed, stringifies to "undefined"

It appears that the test suite currently expects an exception to be 
thrown.  I'm not sure if that really is the correct behaviour or not. 
It seems like something WebIDL should define, but I couldn't find 
anything in the spec on the issue.

-- 
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/
Received on Thursday, 26 February 2009 21:03:32 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:30 GMT