Re: Automating testcases

* Boris Zbarsky wrote:
>On 9/5/10 1:44 PM, Bjoern Hoehrmann wrote:
>> Checking that a browser's rendering of a document contains no red is a
>> one-liner (IECapt | ImageMagick's identify | grep for "#FF0000 red"),
>
>I see no reason this would be guaranteed to work for text, given the 
>typical font-smoothing things going on.

Sure, just like there is no gurantee that running the suit manually will
work as intended. However, if the condition is "no red" and red ends up
in the rendering for some reason other than failing the test, then the
test is broken; and at low resolutions to make something appear red it's
necessary to actually render red every now and then and since the tests
are designed so that a human can quickly and reliably spot the red, the
odds are quite good that there is at least one pixel that is actually
red. In doubt you can also check if there is a lot of "almost red" and
mark the result dubious. So while there is no gurantee, little effort is
required to make something that should work well enough.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Monday, 6 September 2010 00:39:54 UTC