Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Unified Diff: LayoutTests/svg/animations/resources/SVGAnimationTestCase.js

Issue 194943002: Pause the timeline on load in the SVGAnimationTestCase.js framework (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/svg/animations/script-tests/animate-endElement-beginElement.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/svg/animations/resources/SVGAnimationTestCase.js
diff --git a/LayoutTests/svg/animations/resources/SVGAnimationTestCase.js b/LayoutTests/svg/animations/resources/SVGAnimationTestCase.js
index cb01b310ff727b5e1189c4b1083f2fa0d8b396e3..bdc259703767efecea076e5759204c9c85100be0 100644
--- a/LayoutTests/svg/animations/resources/SVGAnimationTestCase.js
+++ b/LayoutTests/svg/animations/resources/SVGAnimationTestCase.js
@@ -98,6 +98,11 @@ function sampleAnimation() {
}
function runSMILTest() {
+ // Pause animations, we'll drive them manually.
+ // This also ensures that the timeline is paused before it starts. This should make the instance time of the below
+ // 'click' (for instance) 0, and hence minimize rounding errors for the addition in moveAnimationTimelineAndSample.
+ rootSVGElement.pauseAnimations();
+
// If eg. an animation is running with begin="0s", and we want to sample the first time, before the animation
// starts, then we can't delay the testing by using an onclick event, as the animation would be past start time.
if (window.animationStartsImmediately) {
@@ -133,9 +138,6 @@ function runAnimationTest(expected) {
++currentTest;
}
- // Pause animations, we'll drive them manually.
- rootSVGElement.pauseAnimations();
-
if (window.testRunner)
setTimeout(sampleAnimation, 0);
else
« no previous file with comments | « no previous file | LayoutTests/svg/animations/script-tests/animate-endElement-beginElement.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698