This test checks if animateLayers has been called before notifyAnimationStarted, but with the threaded compositior, this may not be true.
Created attachment 135621 [details] Patch Removes the race condition in CCLayerTreeHostTestSynchronizeAnimationStartTimes. Also re-enables CCLayerTreeHostTestAddAnimationWithTimingFunction which I think may have been mistakenly disabled rather than CCLayerTreeHostTestSynchronizeAnimationStartTimes.
Created attachment 135648 [details] Patch Before the call to notifyAnimationStarted, we must have a valid layerTreeHostImpl or else we won't be able to compare the start times of the animations. Previously, we'd grabbed this value in TestHooks::animateLayers. This function is called on the impl thread _after_ the call to CCLayerTreeHostImpl::animateLayers. The problem is that we check this value in notifyAnimationStarted which executes on the main thread, possibly before TestHooks::animateLayers. To get around this problem, we grab the pointer to the layerTreeHostImpl in willAnimateLayers instead. This is guaranteed to be called before notifyAnimationStarted (notifyAnimationStarted is called due to a task posted by CCLayerTreeHostImpl::animateLayers, which is called after willAnimateLayers).
Created attachment 135651 [details] Patch Re-enables CCLayerTreeHostTestAddAnimationWithTimingFunction.
Comment on attachment 135651 [details] Patch Clearing flags on attachment: 135651 Committed r113346: <http://trac.webkit.org/changeset/113346>
All reviewed patches have been landed. Closing bug.