[webkit-dev] Testing feature suggestion: animation/interaction pixel-results "on the fly"

Dongsung Huang luxtella at company100.net
Thu Feb 14 00:10:53 PST 2013

>> I'm curious, what would you imagine the ref test contains?
> If I am not mistaken, the composition operations are parallel with the
> ones of SVG and Canvas (aren't they?).
> I would have attempted comparing the 3 implementations as it seems to me
> the pixels values should be the same.
> That was a genuine question about that case :)

Thank you for feedback! :)
I presented gaussian blur case to express my opinion effectively.

As I know, Adobe want to draw CSS Filters and SVG Filters using the same
code. And Canvas does not have something like Filters.
What I want to say is that there are some cases in which snapshot
functionality is more useful.

>> >> Case 2: Fixed Position Element
>> >> [...]
>> >> function repeatedlyCalledDuringScrolling() {
>> >>     ASSERT(getPixel(15, 9) == white);
>> >>     ASSERT(getPixel(15, 10) == green);
>> >>     ASSERT(getPixel(9, 15) == white);
>> >>     ASSERT(getPixel(10, 15) == green);
>> >>     ....
>> >> }
>> >
>> >
>> > I think this shows what I said about correctness and readability:
>> > -Asserting the correctness of the test and the result becomes close to
>> > impossible for the reader. One has to review the full code to have a
>> chance
>> > of understanding an error.
>> > -You cannot cover non trivial cases (images, text, form elements, etc).
>> > -And it is inefficient. You have to render each frame on the UIProcess,
>> move
>> > it to the WebProcess, and box it for JavaScript to process (with pixel
>> > format conversions depending on your graphics system)
>> >
>> > Of the ideas raised, I think this is one of my least favorite for
>> testing
>> > fixed positioning.
>> >
>> Isn't his suggestion the equivalent of what we do today in text-only
>> tests? i.e., printing "pass" or "fail" and making you have to look at
>> the test itself to see what's being tested?
>> If the correctness of the rendering depends on those 4 specific pixels
>> having those four specific values, how exactly are you going to verify
>> that by looking at it?
>> Again, I think I'm just not understanding you here?
> When looking at a test test, you follow the flow to know what it is
> supposed to do and where it breaks.
> How are you supposed to know, _by reading the code_, that the color at
> position 15, 9 should be white?
> Benjamin

I agree on Dirk's opinion. I supports 3 points as follows:
1. we can help to understand what's goal of test by comments
2. when we want to see the graphical result, we can use MiniBrowser like
other text based test.
3. philip's canvas tests (http://philip.html5.org/tests/canvas/suite/tests/)
already use well getImageData to test.

I agree that snapshot test can make hardly maintainable tests, but we have
review process and we can make succinct tests like philip canvas test.
And when pixel test is more suitable, we can use pixel test also.

Best regards,

Dongsung Huang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20130214/86030fee/attachment.html>

More information about the webkit-dev mailing list