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

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 UTC