- From: Stewart Brodie <stewart.brodie@antplc.com>
- Date: Wed, 22 Aug 2007 13:52:24 +0100
- To: public-css-testsuite@w3.org
References: <46B27134.9090406@inkedblade.net> CVS revision 1.4 of test case t040103-ident-03-c.xht I've been looking at this test that was recently much enhanced to test valid and invalid class and ID selectors more thoroughly and fix issues with the earlier revisions, but I believe that there is still a problem with test case 4. This is the case of the selector that is: #-1ident, .four { color:red } The lexical scanners in the CSS2.1 (19 July 2007) and CSS3's Selectors (15 December 2005) specifications both agree that this selector is valid. This is because both of them define names the same way: name {nmchar}+ nmchar [_a-z0-9-]|{nonascii}|{escape} %% "#"{name} { return HASH;} Is this an incorrect test case or are the specifications themselves not describing the intended scanner? I'm not particularly bothered either way, but the inconsistency needs to be resolved. Browser behaviour is inconsistent for this entire test, too: Opera 9.22 reports cases 1, 2, 5 and 6 as failures; Firefox 2.0.0.1 reports no failures; Safari 3.0.2 (522.13.1) reports case 4 as a failure; IE 7.0 (5730.11) reports cases 3 and 4 as failures; I agree with Safari - that's what our browser does too (which it would as I wrote the CSS parser). The patch below would fix the test to match the spec, and making this patch reverses the results for each browser (obviously). All I've done is switch the red and green around. If the test case is deemed incorrect, then there are a couple of others that exhibit the same problem: t040103-ident-08-c.xht (case 2); t0509-id-sel-syntax-01-f.xht Index: t040103-ident-03-c.xht =================================================================== RCS file: /sources/public/CSS/CSS2.1-test-suite/cooked-tests/dbaron-20041214/t040103-ident-03-c.xht,v retrieving revision 1.4 diff -b -c -r1.4 t040103-ident-03-c.xht *** t040103-ident-03-c.xht 3 Aug 2007 02:19:57 -0000 1.4 --- t040103-ident-03-c.xht 22 Aug 2007 12:31:33 -0000 *************** *** 16,23 **** .three { color: green; background: white; } .-1ident, .three { color: red; } ! .four { color: green; background: white; } ! #-1ident, .four { color: red; } .five { color: red; background: white; } .-\31ident, .five { color: green; } --- 16,23 ---- .three { color: green; background: white; } .-1ident, .three { color: red; } ! .four { color: red; background: white; } ! #-1ident, .four { color: green; } .five { color: red; background: white; } .-\31ident, .five { color: green; } -- Stewart Brodie Software Engineer ANT Software Limited
Received on Wednesday, 22 August 2007 12:52:26 UTC