[webkit-dev] Testing feature suggestion: animation/interaction pixel-results "on the fly"
Robert Kroeger
rjkroege at chromium.org
Fri Feb 8 07:53:43 PST 2013
Questions inline.
On Fri, Feb 8, 2013 at 8:35 AM, <noam.rosenthal at nokia.com> wrote:
>
> Hellos
>
> we don't currently have a solution in webkit's test infrastructure for
> testing animations "on the fly", or in general for testing multiple image
> results in the same test.
I have been wishing for such a thing around how to test scroll animations.
> (If this was discussed before and I'm unaware of that discussion, please
> stop me here...)
>
> This is because ImageDiff works on the single-test level, and you can't
> explicitly make image comparisons in the same test at different points in
> time.
> This has before caused us several regressions that were not caught by
> layout tests.
>
> I'd like to propose a solution, and would welcome some feedback on whether
> it's a good one...
> The idea is that you would be able to programatically retrieve the current
> snapshot into a canvas ImageData, and then compare the pixel results with
> JavaScript in the LayoutTest. Something like:
>
> window.testRunner.getWindowSnapshot(function(snapshot) {
> if (snapshot.data[snapshot.width * 100 + 10] != 127)
> output.innerHTML = "FAIL";
> });
>
> WDYT?
How would the test wait for the animation to happen? Tests that use
timeouts seem more likely to be flaky from what I've seen. Could
window.testRunner.getWindowSnapshot take a time delta of some kind?
Rob.
> Noam
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
>
More information about the webkit-dev
mailing list