[webkit-dev] Testing feature suggestion: animation/interaction pixel-results "on the fly"
Benjamin Poulain
benjamin at webkit.org
Fri Feb 8 12:40:18 PST 2013
On Fri, Feb 8, 2013 at 11:12 AM, Ryosuke Niwa <rniwa at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20130208/722146ea/attachment.html>
More information about the webkit-dev
mailing list