On Fri, Feb 8, 2013 at 11:12 AM, Ryosuke Niwa <rn...@webkit.org> wrote:
> I had similar thoughts but my counter "proposal" is to let DRT/WTR > generate multiple actual results either in the form of multiple layers in > PNG or multiple PNG images. The advantage of this latter approach is that > we can have multiple reference files as well. e.g. if a green box is to be > moved from (0,0) to (50,0) and to (100, 0), we could create three reference > files that correspond to each state. > This sounds like a good idea for programmatic updates. I would just argue that instead of multiple images, it would be more maintainable to have multiple html references; a kind of multiple-frame-ref-test. A problem with this approach is, it is still fragile for animations. The position of a given frame is depends on timing. For animations, we could use mask-based test. The reference file of a test is a mask which gives an area where pixels can be. For example: -Take a block in a fixed position, scroll the page. The mask is the block in its original position. If for any frame, the block moved outside the mask, the test fails. -A block animating from left to right, while at the same time the page is scrolled. There is a deterministic path where the object can be. If for any frame, the block moved outside the path, the test fails. Making the mask would not always be trivial. The advantage is, if any single frame is wrong, we have a chance to catch it, regardless of the timing. Benjamin
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev