Three Monkeys, Three Typewriters, Two Days

June 22, 2003

CSS test suites

Dave Hyatt writes about the need for browser makers to cooperate with the CSS Working Group to develop comprehensive test suites so that web designers won't have to. Unfortunately, all the test suites I've seen for CSS focus very much on whether the browser handles valid CSS correctly. Just as important is whether the browser handles invalid css correctly. I've seen people complain that it's much harder to test invalid CSS handling since there are so many ways to be invalid. Yes. That's true. Which is all the more reason to do it—testing valid CSS is easy enough that groups other than the W3C can do it if need be; testing invalid CSS is too hard for anyone else to even contemplate bothering.

Posted by bzbarsky at June 22, 2003 4:01 PM
Comments

I think you dropped the word "invalid" from the third sentence.

Posted by: alanjstr on June 22, 2003 5:19 PM

> Just as important is whether the browser handles
> invalid css correctly.

How can this be done? The possible input errors are enumerable, but they are quite definitly outnumbering anything you want to define a specified behaviour for. At least I don't see an implementation doing anything more than signaling an error (implementation dependent) and recover from something like "kiss my hairy ass, you (/§")$/"!§=)(" ;-). No insult on the reader or writer, just to make sure that a dd if=/dev/random might eventually generate that. Even should. Theoretically.

Or was you whole point dealing with "that's an error, recover"? (That can be hard enough, judging from the XSLT1 spec)

Posted by: Axel Hecht on June 23, 2003 6:28 AM

Well, the CSS spec specifies some very specific error-recovery rules that are NOT implementation-dependent. And testing of implementation compliance to those rules is nearly nonexistent.

In fact (barring some tokenizer issues that are still being discussed), there is no concept of "error" due to the idea that all CSS should be parsed forward-compatibly; there is only CSS from versions of CSS that you don't implement; such CSS should be skipped over in a very specific way.

Posted by: Boris on June 23, 2003 11:51 AM
Post a comment