[webkit-dev] Increasing the number of cross-platform/port expected results

Tor Arne Vestbø tor.arne.vestbo at nokia.com
Tue Feb 23 09:08:14 PST 2010


On 23/2/10 17:34 , Simon Fraser wrote:
> On Feb 23, 2010, at 8:21 AM, Tor Arne Vestbø wrote:
>
>> On 23/2/10 17:02 , Simon Fraser wrote:
>>>
>>> I think the correct longterm solution to this problem is to use
>>> reftests. A reftest consists of two files; the test file, and a
>>> "reference" file that should give the same on-screen rendering.
>>> When the test is run, the browser loads both files, takes
>>> snapshots, and does a pixel comparison. Thus font differences
>>> between platforms become less of an issue.
>>
>> You mean for example that the reference file of a css-border test
>> that has some header-text describing the test would contain the
>> same header-text but then a image to represent the reference of the
>> css-part?
>
> It could be an image, or it could be a configuration of<div>
> elements, or a table, or something else that can be configured to
> look exactly the same as the CSS border property being tested.

Right.

Seems to me we have all the pieces to the puzzle? DRT can ouput a PNG 
with --pixel-tests, we can add foo-reference.html to accompany 
foo-expected.txt, and run-webkit-tests can be taught to pick up on these 
reference-files and run DRT with pixel-tests on both and then use 
ImageDiff to compare them?

Then we can gradually migrate tests to use references rather than 
expected render-trees?

Tor Arne



More information about the webkit-dev mailing list