W3C home > Mailing lists > Public > public-svg-wg@w3.org > January to March 2012

Re: Test content guidelines

From: Brian Birtles <bbirtles@mozilla.com>
Date: Wed, 14 Mar 2012 12:43:24 +0900
Message-ID: <4F6013DC.9030600@mozilla.com>
To: public-svg-wg@w3.org
Hi Alex,

(2012/03/14 11:45), Alex Danilo wrote:
>     This has the advantage of being really easy to determine if a test
>     passed (unlike some of the tests in the SVG 1.1 test suite as I'm
>     sure we're all aware, animate-elem-61-t being just one of many
>     examples). It can also save resources as you can re-use the same
>     reference file.
>
> Well, some reference files. I'd expect test output to contain a
> variation in graphics for many cases...

Yes, you'll inevitably end up with more than one reference file. I 
should have made that plural. But I think you can take the "fill the 
whole viewport with green" approach pretty far. I imagine you could have 
thousands of test cases that use just one reference file (we are 
probably already in the order of hundreds in Gecko).

Who knows, maybe you could cover 90% of the tests with a dozen shared 
reference files? The remaining 10% would be tests that require a 
specific reference file. That's probably too optimistic though.

>     For those cases where it's not practical (e.g. sometimes text can be
>     difficult--but even then you can get quite a way with box-shaped
>     glyphs, see [1]) we might even be able to create other shared
>     reference files to make inspecting test results easier.
>
> SVG Tiny fonts would ease the pain here:-)

Touché ;)

>     For animated tests, in order to support user agents that don't
>     support script, we could perhaps have a guideline that after 1s all
>     animations should be finished/frozen and on success should fill the
>     viewport with green. Scripted agents would run a script that does a
>     seek to t=1s.
>
> I think 1s may be too quick. It's OK for automated tests, but people may
> actually want to watch the animation and 1s doesn't seem to be very long
> especially
> for complex/chained animations, etc.

Fair call.

> But in principle it makes sense.
>     [1] Example test case:
>     https://bug376027.bugzilla.__mozilla.org/attachment.cgi?id=__593735
>     <https://bug376027.bugzilla.mozilla.org/attachment.cgi?id=593735>
>
> That's html with embedded SVG, poor SVG only UAs!

Yes, that's right! Sorry, that wasn't an "example test case" for the 
approach in general, just a demonstration of the font stuff. It was 
created for a specific bug where we wanted to test display:none on an 
outer SVG as well as in other combinations inside an SVG document 
(fragment). If we put something like this in the suite we'd just split 
the two SVG fragments out into separate SVG files.

Thanks Alex,

Brian
Received on Wednesday, 14 March 2012 03:43:53 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:20:14 UTC