Chromium Code Reviews| Index: LayoutTests/animations/resources/animation-test-helpers.js |
| diff --git a/LayoutTests/animations/resources/animation-test-helpers.js b/LayoutTests/animations/resources/animation-test-helpers.js |
| index 1a97ad8cae82e8b25fc49da42fe751dc4d3a7f1a..81f841e382ccb9cf4e0185b85cede7318b7cc066 100644 |
| --- a/LayoutTests/animations/resources/animation-test-helpers.js |
| +++ b/LayoutTests/animations/resources/animation-test-helpers.js |
| @@ -18,7 +18,7 @@ Function parameters: |
| - the tolerance to use when comparing the effective CSS property value with its expected value |
| [1] If null is passed, a regular setTimeout() will be used instead to snapshot the animated property in the future, |
| - instead of fast forwarding using the pauseAnimationAtTimeOnElement() JS API from Internals. |
| + instead of fast forwarding using the pauseAnimations() JS API from Internals. |
|
Steve Block
2013/05/06 01:49:06
It looks like the animation name is still used to
dstockwell
2013/05/06 04:01:00
Not passing a name no longer falls back to the set
|
| [2] If a single string is passed, it is the id of the element to test. If an array with 2 elements is passed they |
| are the ids of 2 elements, whose values are compared for equality. In this case the expected value is ignored |
| @@ -240,15 +240,8 @@ function checkExpectedValue(expected, index) |
| } |
| } |
| - if (animationName && hasPauseAnimationAPI && !internals.pauseAnimationAtTimeOnElement(animationName, time, document.getElementById(elementId))) { |
| - result += "FAIL - animation \"" + animationName + "\" is not running" + "<br>"; |
| - return; |
| - } |
| - |
| - if (compareElements && !element2Static && animationName && hasPauseAnimationAPI && !internals.pauseAnimationAtTimeOnElement(animationName, time, document.getElementById(elementId2))) { |
| - result += "FAIL - animation \"" + animationName + "\" is not running" + "<br>"; |
| - return; |
| - } |
| + if (animationName && hasPauseAnimationAPI) |
| + internals.pauseAnimations(time); |
| var computedValue, computedValue2; |
| if (compareElements) { |
| @@ -386,12 +379,9 @@ function startTest(expected, callback) |
| var maxTime = 0; |
| for (var i = 0; i < expected.length; ++i) { |
| - var animationName = expected[i][0]; |
| var time = expected[i][1]; |
| - // We can only use the animation fast-forward mechanism if there's an animation name |
| - // and Internals implements pauseAnimationAtTimeOnElement() |
| - if (animationName && hasPauseAnimationAPI) |
| + if (hasPauseAnimationAPI) |
| checkExpectedValue(expected, i); |
| else { |
| if (time > maxTime) |