W3C home > Mailing lists > Public > public-css-testsuite@w3.org > February 2009

Re: CSS Namespaces Module Test Suite

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 03 Feb 2009 00:28:54 -0800
Message-ID: <49880046.4040408@inkedblade.net>
To: Anne van Kesteren <annevk@opera.com>
CC: public-css-testsuite@w3.org

Anne van Kesteren wrote:
> 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 [syntax-013.xml] 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.

Mm, these tests don't require scripting, and they're at the same
level as your EOF test.
    @namespace "fail;
    ; t3 { background: lime }
    @namespace url('fail);
    t4 { background: red; }
    t4 { background: lime; }
   <p><t3>This sentence should have a green background.</t3></p>
   <p><t4>This sentence should have a green background.</t4></p>
should do it. Add it if you think these are correct. If consider them
out-of-scope, then the EOF test there should also be removed.

>>>>    - 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.

What I meant was the declaration in that location should have an
effect so it's known that it's not thrown out because of its location,
but is kept. Right now it's overridden by @namespace "test", so you
can't tell if the UA threw it out (which it should not do) or simply
overwrote it (which it should). So I would suggest making one of these
declarations (or both) use a prefix so that they are both kept.

>>>> 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.


>> 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 

Can I get an r+/- here?

>> 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.)

r+ (It's a CSS2.1 requirement. I'll assume Arron has tests for it.)

>>> 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.


Received on Tuesday, 3 February 2009 08:29:35 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:13:18 UTC