Re: [css3-transitions] [css3-animations] API for testing transitions and animations

On 2/14/12 12:19 PM, Aryeh Gregor wrote:
> On the other hand, also philosophically: if there's no way for a
> regular webpage to observe that the behavior is correct, why do we
> care if it's correct?

Two things:

1)  It's possible for a regular web page to observe whether some aspects 
of transition/animation behavior (say computed CSS values as functions 
of time) are correct right now.  You could write tests to do such 
checking; they'd just have to be written _very_ carefully if you want to 
avoid false positives and false negatives.  For internal regression test 
suites, ease of writing reliable tests is important, hence APIs to make 
it easier.

2)  It's possible for a human observer to detect broken aspects of 
transition/animation behavior even if the page is seeing the right 
computed styles (e.g. think a browser implementation that updates the 
styles on demand but doesn't advance the timeline normally).   Of course 
depending on an API for detecting this is silly, since the 
implementation is purposefully lying to the script, basically.  But we 
do somewhat care about not allowing such implementations to be 
considered conformant....

> If the computed values of something change at
> the wrong rate during a transition or animation, can that actually
> conceivably break any webpages?

Sure, especially if they change at different wrong rates for different 
animations, right?

> So how about this.  Have JS tests for whatever unprivileged JS can
> reliably observe, such as start and end states, firing of events, etc.
>   And have animated reftests, which can be run manually by flipping
> back and forth quickly between two iframes as the transition/animation
> occurs (like aryeh.name/tmp/css-test/contributors/aryehgregor/incoming/viewer.html),
> with the test passing if there's no discernible flickering.  Leave
> everything else, such as intermediate computed values, untested.  Does
> that make sense to everyone?

Intermediate computed values can be tested, with some care...

-Boris

Received on Tuesday, 14 February 2012 17:46:50 UTC