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

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.

features = [ "resolution", "min-resolution", "max-resolution" ];
expression_should_not_be_parseable(feature + ": 0dpi");

The test for resolution should be parseable. According to the spec (section 5) the only information about resolution is that it takes a positive number. Unfortunately we defined 0 to be both positive and negative. Thus this case should be parseable. Granted I do think that 0dpi is silly it should be parseable or we should maybe change the spec to say that resolution must a value of 1 or more.

content_div.style.font = "-moz-initial";

There is also a Mozilla prefixed value setting within the test case. All submitted test cases should not include prefixed values or properties.

--
Thanks,
Arron Eicholz

Received on Monday, 26 September 2011 20:53:12 UTC