Exploration of Reftests

This week, my second week down here at Mozilla has been an interesting week as I had the opportunity to explore a variety of hot listed (a list of bugs that need test development attention) bugs found within the layout component – see the bugs.

In particular, I have analyzed a variety of the hot listed and decided to pick up on writing invalidation reftests for the bugs that give me a starting point, in my case – a test case.

The bugs I have written invalidation reftests for this week, and, am continuing to correct and finalize include:

Bug 437704 SVG rendering stops, is a very easily identifiable regression that is in fact, visible in the browser between that of current Firefox 3.0.x and any recent Minefield release (as of writing, I am testing in Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090508 Minefield/3.6a1pre. A problem exists in the layout rendering engine where an SVG graphic (Scalable Vector Graphic, an XML specification and file format for describing two-dimensional vector graphics, both static and animated) does not completely render. See screenshot below.

On the top (or left depending on your screen width) we have Firefox 3.0.10 and on the bottom (or right depending on your screen width) we have a recent build of Minefield (3.6a1pre), where Minefield (1.9.2a1pre) renders correctly and Firefox 3.0.10 ( does not.

left right

The reftest would be interesting in that, despite this scenario being difficult to duplicate as a reference, one might simply use the perfect rendering as the reference for comparison to the test. The image on the left should ideally render complete and look like the image on the right. The test would pass and only pass if every pixel rendered is an exact duplicate of the reference (in this case, the perfect rendered copy).

You can in fact test it out right now, no tools necessary. If you’re on Firefox 3.0.x (, simply click here – the image is supposed to display the average gasoline prices per country – but alas the image does not render properly, or in fact completely. If you’re on a newer build of Firefox 3.5 (Shiretoko)  or Minefield 3.6a1 (1.9.2a1pre) try loading the same image – the results are what you would expect.

As this week comes to a close, I look forward to next week to make any revisions in my tests and move on to other bugs.



2 responses to this post.

  1. Posted by Robert Longson on May 15, 2009 at 7:07 am

    The reftest should be a 100% lime filled rectangle with a really really thin stroke that compares to pass.svg

  2. Posted by Aaron on May 15, 2009 at 3:31 pm

    Ah, I see a generic pass.svg is available.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: