Re: [CSS3-mediaqueries]: Invalid test cases in test suite

On Monday 2011-09-26 20:52 +0000, Arron Eicholz wrote:
> I have diligently been going over the Media Queries test suite and I think I have discovered a few more issues with the test.
> 
>   query_should_not_be_parseable("not (orientation)");
>   query_should_not_be_parseable("only (orientation)");
>   query_should_not_be_parseable("all and color :");
>   query_should_not_be_parseable("all and color : 1");
> 
> The tests for bad parsing are incorrect in some cases. The cases are currently set up to test as not being parseable. The first 2 cases according to Section 3.1 of the media queries spec, a case where the IDENT production is not matched should fall into the malformed media query case. The last 2 cases are specifically malformed media queries. Looking at the malformed media query case, media queries with unexpected tokens should be represented as 'not all'. This then means that the cases I listed above should all be parseable and the .mediaText will return "screen, not all" for all 4 cases.

The spec has changed in this area, and I failed to catch this
update.

I've update the test in https://hg.csswg.org/test/rev/9361a146d63c
and also posted a Mozilla patch in
https://bugzilla.mozilla.org/show_bug.cgi?id=689319 .

Does this update look good to you as well?

(We might want some additional tests in this area, though.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Monday, 26 September 2011 22:03:04 UTC