Bug 148149

Summary: Fix a rare flakiness in svg/animations/svgPreserveAspectRatio-animation-1.html
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: SVGAssignee: Said Abou-Hallawa <sabouhallawa>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, thorton, zimmermann
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Said Abou-Hallawa 2015-08-18 15:57:15 PDT
https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&showExpectations=true&revision=188590&tests=svg%2Fanimations%2FsvgPreserveAspectRatio-animation-1.html 

FAIL rootSVGElement.preserveAspectRatio.animVal.align should be 2. Was 7.
FAIL rootSVGElement.preserveAspectRatio.animVal.meetOrSlice should be 1. Was 2.

shows that the test is somehow flaky. After looking at the failure results. Here is what is happening:

1. The preserveAspectRatio of the SVG root element is set initially to "xMaxYMin meet".
2. An animation element is created to animate the preserveAspectRatio from "xMinYMin meet" to "xMaxYMid slice" in 4s.
3. The script svg/animations/resources/SVGAnimationTestCase.js fakes the animation to able to sample the changes in the animated attributes. It works by splitting the animation period in two halves. The first half the attribute value is set to the from-value and the second half the attribute value is set to the to-value. In this test case the animation period is 4s. So the first two second preserveAspectRatio = "xMinYMin meet" and the last two seconds preserveAspectRatio from "xMaxYMid slice".
4. We are sampling the animation exactly at the 2.0 seconds which is the time the change in the animated value happens. The expected file is assuming preserveAspectRatio to be the from-value ("xMinYMin meet" or "2 1"). But the failure results shows that its value is the to-value ("xMaxYMid slice" or "7 2").
Comment 1 Said Abou-Hallawa 2015-08-18 15:59:59 PDT
Created attachment 259306 [details]
Patch
Comment 2 WebKit Commit Bot 2015-08-18 17:43:56 PDT
Comment on attachment 259306 [details]
Patch

Clearing flags on attachment: 259306

Committed r188613: <http://trac.webkit.org/changeset/188613>
Comment 3 WebKit Commit Bot 2015-08-18 17:44:00 PDT
All reviewed patches have been landed.  Closing bug.