Re: CSS Namespaces Module Test Suite

I've decided to say no against a couple of tests. I do not think it is  
needed to be as exhaustive as you are suggesting for this particular  
feature, especially as most of the potential issues are not constrained to  
this module and probably better tested in the syntax test suite.


On Wed, 28 Jan 2009 21:31:38 +0100, fantasai  
<fantasai.lists@inkedblade.net> wrote:
>>  Done (syntax-013.xml, one test requires scripting). (Actually managed  
>> to find a bug here in at least Opera and Firefox. The @namespace rule  
>> in the style sheet '@namespace x "test' gets dropped rather than fixed  
>> up per the rules in CSS 2.1 section 4.2.)
>
> You should probably split this into two tests, one for the  
> end-of-stylesheet
> error (that requires scripting) and one for other errors (that don't  
> require
> scripting).

I decided not do this since the two implementations we'll use to exit CR  
will both support scripting in all likelyhood.


> For the non-scripting test, add a few more tests:
>
>    - Space between @ and namespace, e.g. @ namespace "test";

This is general at-rule parsing and therefore not needed.


>    - Missing end quote: @namespace "test;

This requires scripting and is already tested. Unless you wrote  
'@namespace "test;' (and did not use ; as a delimiter) in which case this  
is not explicitly tested but I do not think that is needed.


>    - Missing end quote in url: @namespace url('test);

This would also require scripting but is essentially the same test. Syntax  
module imo.


>    - Missing end-parens in url (should eat until close parens):  
> @namespace url(test;

Same.


>>>    - tests for @namespace followed by an invalid @rule (both invalid
>>>      rules with known @keywords and rules with unknown @keywords)
>>  Done (syntax-014.xml).
>
> The rule for t should use a prefix so that it is ignored if the  
> @namespace doesn't get parsed properly.

Done.


> You probably also want the "test-wrong" declaration to have some
> testable effect.

Done.


>>> http://dev.w3.org/CSS/css3-namespace-test-suite/src/scope-002.xml
>>>
>>>    - Shift the test { background: lime } up into a separate <style>
>>>    - Add an @namespace w declaration to the <style> with the @import
>>>      and a
>>>        w|test { background:red}
>>>      rule to the scope.css style sheet
>>>    - Add another @import with another external style sheet and add
>>>      y and z declarations/selectors to test crossing sibling @imports.
>>  Done, except that I did not add a z declaration/selector because that
>> seemed unnecessary.
>
> Ok. But you wrote
>    test|y { background:lime }
> instead of
>    y|test { background: red }
> I fixed it for you. Please verify that the test is now correct.

Yup.


>>> http://dev.w3.org/CSS/css3-namespace-test-suite/src/syntax-003.xml
>>>
>>>    - The title should mention that this is a default namespace
>>>      declaration.
>>>    - Add corresponding tests with 'string' and "string".
>>  Done, also added url() and url('').
>
> I think you meant to leave out the prefixes in all these @namespace
> declarations?
>
> r- because the test is meaningless as-is.

Yeah, copy & paste mistake.


>>> http://dev.w3.org/CSS/css3-namespace-test-suite/src/syntax-005.xml
>>> http://dev.w3.org/CSS/css3-namespace-test-suite/src/syntax-006.xml
>>>
>>>    - Apart from the escaped r, it seems -006 is merely a more complex
>>>      form of -005, i.e. aside from the escape -005's test is a subset
>>>      of -006. Was that the intent, or am I missing something here?
>>>      Because if so, I would suggest removing -005, it doesn't seem
>>>      necessary.
>>  -005 is now a new test.
>
> Ok. Since syntax-006.xml is an invalid test, I've flagged it as invalid.

Does the invalid flag apply to tests using invalid CSS?


> Also made the title a bit clearer. Please review these changes:
>
>    http://dev.w3.org/cvsweb/CSS/css3-namespace-test-suite/src/syntax-006.xml.diff?r1=1.2&r2=1.3&sortby=file
>
> Also, the I would change the first @namespace declaration to use a prefix
> and use that prefix instead of *, like this:
>
>     @namespace x u\00072l("test");
>     @import url("support/fail.css");
>     @namespace url("test2");
>     x|test { background:lime }
>     test { background:red }
>
> This makes sure that the first @namespace is being processed correctly.

Done.


>>> http://dev.w3.org/CSS/css3-namespace-test-suite/src/syntax-007.xml
>>>
>>>    - This test is effectively the same as one with the @charset rule
>>>      replaced by @foo;, because @charset is not valid there. You need
>>>      to rewrite this test to use an external style sheet and place
>>>      the @charset rule at the start of the style sheet.
>>  Done.
>
> The test is wrong. Because the @charset specifies an unknown encoding,
> UAs are required to ignore the style sheet. Try specifying UTF-8.

Done. (Though fwiw, UAs are not interoperable on that @charset rule, if  
that is in fact a requirement.)


>> On Mon, 13 Oct 2008 14:34:43 +0200, fantasai
>> <fantasai.lists@inkedblade.net> wrote:
>>> Other tests needed:
>>>
>>>    "A URI string parsed from the URI syntax must be treated as a
>>>     literal string: as with the STRING syntax, no URI-specific
>>>     normalization is applied."
>>>
>>>    So a couple good tests here would be
>>>      - comparing http://... in the source with HTTP://..., in the style
>>>        sheet
>>>      - comparing .com in the source with .COM in the style sheet
>>>      - comparing a straight URL with one that has URI (%) escapes in it
>>>
>>  Done (syntax-011.xml).
>
> Very good, except you forgot to use url() syntax. :)

Ok, used url() instead.


> Yeah, but it's best if we write a test that will be accurate on both
> types of systems. In any case, the validity of non-URI strings in CSS
> needs a test. :)

Ok, whatever. syntax-015 it is.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Monday, 2 February 2009 14:51:20 UTC