Convert svg/animations to use SMIL methods for driving the timeline
authorzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Feb 2012 08:41:30 +0000 (08:41 +0000)
committerzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Feb 2012 08:41:30 +0000 (08:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=78422

Reviewed by Dirk Schulze.

Source/WebCore:

Switch the svg/animations tests to use SVGSVGElement.setCurrentTime to drive the animation timeline.
This should fix all flakiness we previously had with these tests - and as nice side-effect we're now
using the standard SVG methods to drive the timeline, and thus have more coverage for these methods.
It already exposed several SMIL bugs, that had to be fixed, before this worked:

- beginElement()/endElement() modify the begin/end times of a SVGSMILElement. When beginElement() is
  called a new begin time is added to the list - and the same happens for endElement() with the end list.
  Unfortunately the begin/end times never get removed again, leading to incorrect instance time resolving
  when begin/endElement is called repeatedly, combined with moving the timeline through setCurrentTime.

  SMIL3 specifically demands that all 'dynamic' times in the begin/endTimes list, such that got inserted
  via beginElement/endElement - get removed if the begin/endTimes list is updated. Why?
  When calling beginElement, then endElement, then beginElement again, the begin/endTimes lists should be
  identical, w/o leftovers from any previous begin/endElement call.

  To keep track of that introduce SMILTimeWithOrigin, which holds a SMILTime and an Origin enum,
  which determines whether this SMILTime was created by the parser or dynamically created via
  beginElement/endElement.

- SMILTimeContainer::setElapsed() (called by SVGSVGElement::setCurrentTime) forgot to update the
  animation state, when it was not paused.

- document.getElementsByTagName('animateMotion')[0], always returned 'object SVGElement', instead of
  SVGAnimateMotion element making it impossible to query the animation start time, as the interfaces
  from SVGAnimationElement were not available. Fix that by removing the last hacks from svgtags.in,
  now that all IDLs are available.

Now that we use SVGSVGElement::setCurrentTime to drive the animation testing, we can remove
the DRT specific sampleSVGAnimationAtTime functionality, and its code springled all over WebCore.

Covered by all existing tests in svg/animations.

* WebCore.exp.in: Remove sampleAnimationAtTime() symbols.
* WebCore.order: Ditto.
* svg/SVGAnimationElement.cpp: Add a flag to begin/endElement, SMILTimeWithOrigin::ScriptOrigin, to indicate that these are dynamic SMILTimes, added by a script.
(WebCore::SVGAnimationElement::beginElementAt):
(WebCore::SVGAnimationElement::endElementAt):
* svg/SVGDocumentExtensions.cpp: Remove sampleAnimationAtTime.
* svg/SVGDocumentExtensions.h: Ditto.
* svg/animation/SMILTime.h: Add SMILTimeWithOrigin helper.
(SMILTimeWithOrigin): Needs a SMILTime and an Origin enum entry.
(WebCore::SMILTimeWithOrigin::SMILTimeWithOrigin):
(WebCore::SMILTimeWithOrigin::time): Returns the SMILTime.
(WebCore::SMILTimeWithOrigin::originIsScript): Determines if this SMILTime got added by a script.
(WebCore::operator<): Used by std::sort.
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::setElapsed): Always call updateAnimations, even if the animation is not paused. Use the right elpased time value, to seek precisely to the desired position.
(WebCore::SMILTimeContainer::timerFired): Cleanup code, no need for a local variable 'elapsed'.
(WebCore::SMILTimeContainer::updateAnimations): Remove DRT specific sampling code, which is no longer needed.
* svg/animation/SMILTimeContainer.h: Remove sampleAnimationAtTime.
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::SVGSMILElement): Only call resolveFirstInterval, not reset, from the constructor - it wastes unnecessary time, as everything is already initialized.
(WebCore::clearTimesWithDynamicOrigins): Helper function to clear all SMILTimes from the begin/endTimes list, that are dynamic.
(WebCore::SVGSMILElement::reset): Clear begin/endTimes lists, on any reset() call (when driving the animation timeline through setElapsed).
(WebCore::SVGSMILElement::insertedIntoDocument): m_beginTimes now stores SMILTimeWithOrigins, adapt the code.
(WebCore::sortTimeList): Ditto.
(WebCore::SVGSMILElement::parseBeginOrEnd): Ditto.
(WebCore::SVGSMILElement::addBeginTime): Ditto.
(WebCore::SVGSMILElement::addEndTime): Ditto.
(WebCore::extractTimeFromVector): Ditto.
(WebCore::SVGSMILElement::findInstanceTime): Ditto.
* svg/animation/SVGSMILElement.h:
* svg/svgtags.in: Enable animateMotion/hkern/mpath JS interfaces, which were not enabled, despite their IDLs existed.

Source/WebKit/chromium:

Remove SVG animation sampling functionality provided for DRT, which no longer uses it.
Instead we switched the svg/animations tests to use SVGSVGElement.setCurrentTime.

* public/WebFrame.h:
(WebFrame):
* src/WebFrameImpl.cpp:
* src/WebFrameImpl.h:
(WebFrameImpl):

Source/WebKit/efl:

Remove SVG animation sampling functionality provided for DRT, which no longer uses it.
Instead we switched the svg/animations tests to use SVGSVGElement.setCurrentTime.

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
* WebCoreSupport/DumpRenderTreeSupportEfl.h:

Source/WebKit/gtk:

Remove SVG animation sampling functionality provided for DRT, which no longer uses it.
Instead we switched the svg/animations tests to use SVGSVGElement.setCurrentTime.

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
* WebCoreSupport/DumpRenderTreeSupportGtk.h:
(DumpRenderTreeSupportGtk):

Source/WebKit/mac:

Remove SVG animation sampling functionality provided for DRT, which no longer uses it.
Instead we switched the svg/animations tests to use SVGSVGElement.setCurrentTime.

* WebKit.order:
* WebView/WebFrame.mm:
* WebView/WebFramePrivate.h:

Source/WebKit/qt:

Remove SVG animation sampling functionality provided for DRT, which no longer uses it.
Instead we switched the svg/animations tests to use SVGSVGElement.setCurrentTime.

* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
* WebCoreSupport/DumpRenderTreeSupportQt.h:

Source/WebKit/win:

Remove SVG animation sampling functionality provided for DRT, which no longer uses it.
Instead we switched the svg/animations tests to use SVGSVGElement.setCurrentTime.

* Interfaces/IWebFramePrivate.idl:
* WebFrame.cpp:
* WebFrame.h:

Tools:

Remove no longer needed SVG specific animation sampling functionality from DRT.
Instead we switched the svg/animations tests to use SVGSVGElement.setCurrentTime.

* DumpRenderTree/LayoutTestController.cpp:
(LayoutTestController::staticFunctions):
* DumpRenderTree/LayoutTestController.h:
(LayoutTestController):
* DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp:
* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::LayoutTestController):
* DumpRenderTree/chromium/LayoutTestController.h:
(LayoutTestController):
* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
* DumpRenderTree/mac/LayoutTestControllerMac.mm:
* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
* DumpRenderTree/qt/LayoutTestControllerQt.h:
(LayoutTestController):
* DumpRenderTree/win/LayoutTestControllerWin.cpp:
* DumpRenderTree/wx/LayoutTestControllerWx.cpp:

LayoutTests:

Switch the svg/animations tests to use SVGSVGElement.setCurrentTime to drive the animation timeline.
This should fix all flakiness we previously had with these tests - and as nice side-effect we're now
using the standard SVG methods to drive the timeline, and thus have more coverage for these methods.
It already exposed several SMIL bugs, that had to be fixed, before this worked.

This also unifies & cleans up the tests, to use the same formatting and the same shouldBeCloseEnough helpers.

* svg/animations/animVal-basics-expected.txt:
* svg/animations/animVal-basics.html:
* svg/animations/animate-calcMode-spline-by-expected.txt:
* svg/animations/animate-calcMode-spline-by.html:
* svg/animations/animate-calcMode-spline-from-by-expected.txt:
* svg/animations/animate-calcMode-spline-from-by.html:
* svg/animations/animate-calcMode-spline-from-to-expected.txt:
* svg/animations/animate-calcMode-spline-from-to.html:
* svg/animations/animate-calcMode-spline-to-expected.txt:
* svg/animations/animate-calcMode-spline-to.html:
* svg/animations/animate-calcMode-spline-values-expected.txt:
* svg/animations/animate-calcMode-spline-values.html:
* svg/animations/animate-color-calcMode-discrete.html:
* svg/animations/animate-color-fill-currentColor.html:
* svg/animations/animate-color-fill-from-by.html:
* svg/animations/animate-color-rgba-calcMode-discrete.html:
* svg/animations/animate-color-transparent.html:
* svg/animations/animate-currentColor.html:
* svg/animations/animate-dynamic-update-attributeName.html:
* svg/animations/animate-end-attribute-expected.txt:
* svg/animations/animate-end-attribute.html:
* svg/animations/animate-endElement-beginElement.html:
* svg/animations/animate-from-to-keyTimes.html:
* svg/animations/animate-gradient-transform.html:
* svg/animations/animate-inherit-css-property.html:
* svg/animations/animate-insert-begin.html:
* svg/animations/animate-insert-no-begin.html:
* svg/animations/animate-keySplines.html:
* svg/animations/animate-mpath-insert.html:
* svg/animations/animate-number-calcMode-discrete-expected.txt:
* svg/animations/animate-number-calcMode-discrete-keyTimes.html:
* svg/animations/animate-number-calcMode-discrete.html:
* svg/animations/animate-path-animation-Cc-Ss-expected.txt:
* svg/animations/animate-path-animation-Cc-Ss.html:
* svg/animations/animate-path-animation-Ll-Vv-Hh-expected.txt:
* svg/animations/animate-path-animation-Ll-Vv-Hh.html:
* svg/animations/animate-path-animation-Qq-Tt.html:
* svg/animations/animate-path-animation-cC-sS-inverse-expected.txt:
* svg/animations/animate-path-animation-cC-sS-inverse.html:
* svg/animations/animate-path-animation-lL-vV-hH-inverse-expected.txt:
* svg/animations/animate-path-animation-lL-vV-hH-inverse.html:
* svg/animations/animate-path-animation-qQ-tT-inverse.html:
* svg/animations/animate-path-nested-transforms-expected.txt:
* svg/animations/animate-path-nested-transforms.html:
* svg/animations/animate-path-to-animation-expected.txt:
* svg/animations/animate-path-to-animation.html:
* svg/animations/animate-text-nested-transforms-expected.txt:
* svg/animations/animate-text-nested-transforms.html:
* svg/animations/animateTransform-pattern-transform.html:
* svg/animations/resources/SVGAnimationTestCase.js:
(isCloseEnough):
(shouldBeCloseEnough):
(moveAnimationTimelineAndSample):
(sampleAnimation):
(runSMILTest):
(runAnimationTest):
* svg/animations/script-tests/TEMPLATE.html: Removed.
* svg/animations/script-tests/animVal-basics.js:
(sample3):
(executeTest):
* svg/animations/script-tests/animate-calcMode-spline-by.js:
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/animate-calcMode-spline-from-by.js:
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/animate-calcMode-spline-from-to.js:
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/animate-calcMode-spline-to.js:
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/animate-calcMode-spline-values.js:
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/animate-color-calcMode-discrete.js:
(executeTest):
* svg/animations/script-tests/animate-color-fill-currentColor.js:
(executeTest):
* svg/animations/script-tests/animate-color-fill-from-by.js:
(executeTest):
* svg/animations/script-tests/animate-color-rgba-calcMode-discrete.js:
(executeTest):
* svg/animations/script-tests/animate-color-transparent.js:
(executeTest):
* svg/animations/script-tests/animate-currentColor.js:
(executeTest):
* svg/animations/script-tests/animate-dynamic-update-attributeName.js:
(executeTest):
* svg/animations/script-tests/animate-end-attribute.js:
(sample1):
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/animate-endElement-beginElement.js:
(executeTest):
(end):
(begin):
* svg/animations/script-tests/animate-from-to-keyTimes.js:
(executeTest):
* svg/animations/script-tests/animate-gradient-transform.js:
(executeTest):
* svg/animations/script-tests/animate-inherit-css-property.js:
(executeTest):
* svg/animations/script-tests/animate-insert-begin.js:
(executeTest):
* svg/animations/script-tests/animate-insert-no-begin.js:
(executeTest):
* svg/animations/script-tests/animate-keySplines.js:
(executeTest):
* svg/animations/script-tests/animate-mpath-insert.js:
(executeTest):
* svg/animations/script-tests/animate-number-calcMode-discrete-keyTimes.js:
(executeTest):
* svg/animations/script-tests/animate-number-calcMode-discrete.js:
(sample1):
(sample2):
(executeTest):
* svg/animations/script-tests/animate-path-animation-Cc-Ss.js:
(sample4):
(executeTest):
* svg/animations/script-tests/animate-path-animation-Ll-Vv-Hh.js:
(sample4):
(executeTest):
* svg/animations/script-tests/animate-path-animation-Qq-Tt.js:
(executeTest):
* svg/animations/script-tests/animate-path-animation-cC-sS-inverse.js:
(sample4):
(executeTest):
* svg/animations/script-tests/animate-path-animation-lL-vV-hH-inverse.js:
(sample4):
(executeTest):
* svg/animations/script-tests/animate-path-animation-qQ-tT-inverse.js:
(executeTest):
* svg/animations/script-tests/animate-path-nested-transforms.js:
(g.setAttribute.rect.createSVGElement.rect.setAttribute.rect.setAttribute.rect.setAttribute.rect.setAttribute.rect.setAttribute.g.appendChild.animateMotion.createSVGElement.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.g.appendChild.rootSVGElement.appendChild.startSample):
(endSample):
(executeTest):
* svg/animations/script-tests/animate-path-to-animation.js:
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/animate-text-nested-transforms.js:
(rootSVGElement.setAttribute.text.createSVGElement.text.setAttribute.text.textContent.string_appeared_here.text.setAttribute.animateMotion.createSVGElement.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.text.appendChild.rootSVGElement.appendChild.startSample):
(endSample):
(executeTest):
* svg/animations/script-tests/animateTransform-pattern-transform.js:
(executeTest):
* svg/animations/script-tests/svgPreserveAspectRatio-animation-1.js:
(sample1):
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/svgangle-animation-deg-to-grad.js:
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/svgangle-animation-deg-to-rad.js:
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/svgangle-animation-grad-to-deg.js:
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/svgangle-animation-grad-to-rad.js:
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/svgangle-animation-rad-to-deg.js:
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/svgangle-animation-rad-to-grad.js:
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/svgboolean-animation-1.js:
(sample1):
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/svginteger-animation-1.js:
(sample1):
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/svglength-animation-LengthModeHeight.js:
(sample3):
(executeTest):
* svg/animations/script-tests/svglength-animation-LengthModeOther.js:
(sample3):
(executeTest):
* svg/animations/script-tests/svglength-animation-LengthModeWidth.js:
(sample3):
(executeTest):
* svg/animations/script-tests/svglength-animation-invalid-value-1.js:
(executeTest):
* svg/animations/script-tests/svglength-animation-invalid-value-2.js:
(executeTest):
* svg/animations/script-tests/svglength-animation-invalid-value-3.js:
(executeTest):
* svg/animations/script-tests/svglength-animation-number-to-number.js:
(sample3):
(executeTest):
* svg/animations/script-tests/svglength-animation-px-to-cm.js:
(sample3):
(executeTest):
* svg/animations/script-tests/svglength-animation-px-to-ems.js:
(sample3):
(executeTest):
* svg/animations/script-tests/svglength-animation-px-to-exs.js:
(sample3):
(executeTest):
* svg/animations/script-tests/svglength-animation-px-to-in.js:
(sample3):
(executeTest):
* svg/animations/script-tests/svglength-animation-px-to-number.js:
(sample3):
(executeTest):
* svg/animations/script-tests/svglength-animation-px-to-pc.js:
(sample3):
(executeTest):
* svg/animations/script-tests/svglength-animation-px-to-percentage.js:
(sample3):
(executeTest):
* svg/animations/script-tests/svglength-animation-px-to-pt.js:
(sample3):
(executeTest):
* svg/animations/script-tests/svglength-animation-px-to-px.js:
(sample3):
(executeTest):
* svg/animations/script-tests/svglength-animation-unitType.js:
(executeTest):
* svg/animations/script-tests/svglength-animation-values.js:
(sample5):
(executeTest):
* svg/animations/script-tests/svglengthlist-animation-1.js:
(sample1):
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/svglengthlist-animation-2.js:
(sample3):
(executeTest):
* svg/animations/script-tests/svglengthlist-animation-3.js:
(sample1):
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/svglengthlist-animation-4.js:
(sample1):
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/svglengthlist-animation-5.js:
(sample1):
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/svgnumber-animation-1.js:
(executeTest):
* svg/animations/script-tests/svgnumber-animation-2.js:
(executeTest):
* svg/animations/script-tests/svgnumber-animation-3.js:
(executeTest):
* svg/animations/script-tests/svgnumberlist-animation-1.js:
(sample1):
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/svgnumberlist-animation-2.js:
(sample1):
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/svgnumberoptionalnumber-animation-1.js:
(sample1):
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/svgnumberoptionalnumber-animation-2.js:
(sample1):
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/svgnumberoptionalnumber-animation-3.js:
(sample1):
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/svgnumberoptionalnumber-animation-4.js:
(sample1):
(sample2):
(sample3):
(executeTest):
* svg/animations/script-tests/svgpath-animation-1.js:
(sample3):
(executeTest):
* svg/animations/script-tests/svgpointlist-animation-1.js:
(sample3):
(executeTest):
* svg/animations/script-tests/svgpointlist-animation-2.js:
(sample3):
(executeTest):
* svg/animations/script-tests/svgrect-animation-1.js:
(sample3):
(executeTest):
* svg/animations/script-tests/svgrect-animation-2.js:
(sample3):
(executeTest):
* svg/animations/script-tests/svgstring-animation-fallback-to-discrete.js:
(executeTest):
* svg/animations/script-tests/svgtransform-animation-1.js:
(executeTest):
* svg/animations/script-tests/svgtransform-animation-discrete.js:
(executeTest):
* svg/animations/smil-element-not-removed-crash.html:
* svg/animations/svgPreserveAspectRatio-animation-1.html:
* svg/animations/svgangle-animation-deg-to-grad-expected.txt:
* svg/animations/svgangle-animation-deg-to-grad.html:
* svg/animations/svgangle-animation-deg-to-rad-expected.txt:
* svg/animations/svgangle-animation-deg-to-rad.html:
* svg/animations/svgangle-animation-grad-to-deg-expected.txt:
* svg/animations/svgangle-animation-grad-to-deg.html:
* svg/animations/svgangle-animation-grad-to-rad-expected.txt:
* svg/animations/svgangle-animation-grad-to-rad.html:
* svg/animations/svgangle-animation-rad-to-deg-expected.txt:
* svg/animations/svgangle-animation-rad-to-deg.html:
* svg/animations/svgangle-animation-rad-to-grad-expected.txt:
* svg/animations/svgangle-animation-rad-to-grad.html:
* svg/animations/svgboolean-animation-1.html:
* svg/animations/svginteger-animation-1.html:
* svg/animations/svglength-animation-LengthModeHeight-expected.txt:
* svg/animations/svglength-animation-LengthModeHeight.html:
* svg/animations/svglength-animation-LengthModeOther-expected.txt:
* svg/animations/svglength-animation-LengthModeOther.html:
* svg/animations/svglength-animation-LengthModeWidth-expected.txt:
* svg/animations/svglength-animation-LengthModeWidth.html:
* svg/animations/svglength-animation-invalid-value-1.html:
* svg/animations/svglength-animation-invalid-value-2.html:
* svg/animations/svglength-animation-invalid-value-3.html:
* svg/animations/svglength-animation-number-to-number-expected.txt:
* svg/animations/svglength-animation-number-to-number.html:
* svg/animations/svglength-animation-px-to-cm-expected.txt:
* svg/animations/svglength-animation-px-to-cm.html:
* svg/animations/svglength-animation-px-to-ems-expected.txt:
* svg/animations/svglength-animation-px-to-ems.html:
* svg/animations/svglength-animation-px-to-exs-expected.txt:
* svg/animations/svglength-animation-px-to-exs.html:
* svg/animations/svglength-animation-px-to-in-expected.txt:
* svg/animations/svglength-animation-px-to-in.html:
* svg/animations/svglength-animation-px-to-number-expected.txt:
* svg/animations/svglength-animation-px-to-number.html:
* svg/animations/svglength-animation-px-to-pc-expected.txt:
* svg/animations/svglength-animation-px-to-pc.html:
* svg/animations/svglength-animation-px-to-percentage-expected.txt:
* svg/animations/svglength-animation-px-to-percentage.html:
* svg/animations/svglength-animation-px-to-pt-expected.txt:
* svg/animations/svglength-animation-px-to-pt.html:
* svg/animations/svglength-animation-px-to-px-expected.txt:
* svg/animations/svglength-animation-px-to-px.html:
* svg/animations/svglength-animation-unitType.html:
* svg/animations/svglength-animation-values-expected.txt:
* svg/animations/svglength-animation-values.html:
* svg/animations/svglengthlist-animation-1.html:
* svg/animations/svglengthlist-animation-2-expected.txt:
* svg/animations/svglengthlist-animation-2.html:
* svg/animations/svglengthlist-animation-3.html:
* svg/animations/svglengthlist-animation-4.html:
* svg/animations/svglengthlist-animation-5.html:
* svg/animations/svgnumber-animation-1.html:
* svg/animations/svgnumber-animation-2.html:
* svg/animations/svgnumber-animation-3.html:
* svg/animations/svgnumberlist-animation-1-expected.txt:
* svg/animations/svgnumberlist-animation-1.html:
* svg/animations/svgnumberlist-animation-2-expected.txt:
* svg/animations/svgnumberlist-animation-2.html:
* svg/animations/svgnumberoptionalnumber-animation-1.html:
* svg/animations/svgnumberoptionalnumber-animation-2.html:
* svg/animations/svgnumberoptionalnumber-animation-3.html:
* svg/animations/svgnumberoptionalnumber-animation-4.html:
* svg/animations/svgpath-animation-1-expected.txt:
* svg/animations/svgpath-animation-1.html:
* svg/animations/svgpointlist-animation-1-expected.txt:
* svg/animations/svgpointlist-animation-1.html:
* svg/animations/svgpointlist-animation-2-expected.txt:
* svg/animations/svgpointlist-animation-2.html:
* svg/animations/svgrect-animation-1-expected.txt:
* svg/animations/svgrect-animation-1.html:
* svg/animations/svgrect-animation-2-expected.txt:
* svg/animations/svgrect-animation-2.html:
* svg/animations/svgstring-animation-fallback-to-discrete-expected.txt:
* svg/animations/svgstring-animation-fallback-to-discrete.html:
* svg/animations/svgtransform-animation-1.html:
* svg/animations/svgtransform-animation-discrete-expected.txt:
* svg/animations/svgtransform-animation-discrete.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@107682 268f45cc-cd09-0410-ab3c-d52691b4dbfc

261 files changed:
LayoutTests/ChangeLog
LayoutTests/svg/animations/animVal-basics-expected.txt
LayoutTests/svg/animations/animVal-basics.html
LayoutTests/svg/animations/animate-calcMode-spline-by-expected.txt
LayoutTests/svg/animations/animate-calcMode-spline-by.html
LayoutTests/svg/animations/animate-calcMode-spline-from-by-expected.txt
LayoutTests/svg/animations/animate-calcMode-spline-from-by.html
LayoutTests/svg/animations/animate-calcMode-spline-from-to-expected.txt
LayoutTests/svg/animations/animate-calcMode-spline-from-to.html
LayoutTests/svg/animations/animate-calcMode-spline-to-expected.txt
LayoutTests/svg/animations/animate-calcMode-spline-to.html
LayoutTests/svg/animations/animate-calcMode-spline-values-expected.txt
LayoutTests/svg/animations/animate-calcMode-spline-values.html
LayoutTests/svg/animations/animate-color-calcMode-discrete.html
LayoutTests/svg/animations/animate-color-fill-currentColor.html
LayoutTests/svg/animations/animate-color-fill-from-by.html
LayoutTests/svg/animations/animate-color-rgba-calcMode-discrete.html
LayoutTests/svg/animations/animate-color-transparent.html
LayoutTests/svg/animations/animate-currentColor.html
LayoutTests/svg/animations/animate-dynamic-update-attributeName.html
LayoutTests/svg/animations/animate-end-attribute-expected.txt
LayoutTests/svg/animations/animate-end-attribute.html
LayoutTests/svg/animations/animate-endElement-beginElement.html
LayoutTests/svg/animations/animate-from-to-keyTimes.html
LayoutTests/svg/animations/animate-gradient-transform.html
LayoutTests/svg/animations/animate-inherit-css-property.html
LayoutTests/svg/animations/animate-insert-begin.html
LayoutTests/svg/animations/animate-insert-no-begin.html
LayoutTests/svg/animations/animate-keySplines.html
LayoutTests/svg/animations/animate-mpath-insert.html
LayoutTests/svg/animations/animate-number-calcMode-discrete-expected.txt
LayoutTests/svg/animations/animate-number-calcMode-discrete-keyTimes.html
LayoutTests/svg/animations/animate-number-calcMode-discrete.html
LayoutTests/svg/animations/animate-path-animation-Cc-Ss-expected.txt
LayoutTests/svg/animations/animate-path-animation-Cc-Ss.html
LayoutTests/svg/animations/animate-path-animation-Ll-Vv-Hh-expected.txt
LayoutTests/svg/animations/animate-path-animation-Ll-Vv-Hh.html
LayoutTests/svg/animations/animate-path-animation-Qq-Tt.html
LayoutTests/svg/animations/animate-path-animation-cC-sS-inverse-expected.txt
LayoutTests/svg/animations/animate-path-animation-cC-sS-inverse.html
LayoutTests/svg/animations/animate-path-animation-lL-vV-hH-inverse-expected.txt
LayoutTests/svg/animations/animate-path-animation-lL-vV-hH-inverse.html
LayoutTests/svg/animations/animate-path-animation-qQ-tT-inverse.html
LayoutTests/svg/animations/animate-path-nested-transforms-expected.txt
LayoutTests/svg/animations/animate-path-nested-transforms.html
LayoutTests/svg/animations/animate-path-to-animation-expected.txt
LayoutTests/svg/animations/animate-path-to-animation.html
LayoutTests/svg/animations/animate-text-nested-transforms-expected.txt
LayoutTests/svg/animations/animate-text-nested-transforms.html
LayoutTests/svg/animations/animateTransform-pattern-transform.html
LayoutTests/svg/animations/resources/SVGAnimationTestCase.js
LayoutTests/svg/animations/script-tests/TEMPLATE.html [deleted file]
LayoutTests/svg/animations/script-tests/animVal-basics.js
LayoutTests/svg/animations/script-tests/animate-calcMode-spline-by.js
LayoutTests/svg/animations/script-tests/animate-calcMode-spline-from-by.js
LayoutTests/svg/animations/script-tests/animate-calcMode-spline-from-to.js
LayoutTests/svg/animations/script-tests/animate-calcMode-spline-to.js
LayoutTests/svg/animations/script-tests/animate-calcMode-spline-values.js
LayoutTests/svg/animations/script-tests/animate-color-calcMode-discrete.js
LayoutTests/svg/animations/script-tests/animate-color-fill-currentColor.js
LayoutTests/svg/animations/script-tests/animate-color-fill-from-by.js
LayoutTests/svg/animations/script-tests/animate-color-rgba-calcMode-discrete.js
LayoutTests/svg/animations/script-tests/animate-color-transparent.js
LayoutTests/svg/animations/script-tests/animate-currentColor.js
LayoutTests/svg/animations/script-tests/animate-dynamic-update-attributeName.js
LayoutTests/svg/animations/script-tests/animate-end-attribute.js
LayoutTests/svg/animations/script-tests/animate-endElement-beginElement.js
LayoutTests/svg/animations/script-tests/animate-from-to-keyTimes.js
LayoutTests/svg/animations/script-tests/animate-gradient-transform.js
LayoutTests/svg/animations/script-tests/animate-inherit-css-property.js
LayoutTests/svg/animations/script-tests/animate-insert-begin.js
LayoutTests/svg/animations/script-tests/animate-insert-no-begin.js
LayoutTests/svg/animations/script-tests/animate-keySplines.js
LayoutTests/svg/animations/script-tests/animate-mpath-insert.js
LayoutTests/svg/animations/script-tests/animate-number-calcMode-discrete-keyTimes.js
LayoutTests/svg/animations/script-tests/animate-number-calcMode-discrete.js
LayoutTests/svg/animations/script-tests/animate-path-animation-Cc-Ss.js
LayoutTests/svg/animations/script-tests/animate-path-animation-Ll-Vv-Hh.js
LayoutTests/svg/animations/script-tests/animate-path-animation-Qq-Tt.js
LayoutTests/svg/animations/script-tests/animate-path-animation-cC-sS-inverse.js
LayoutTests/svg/animations/script-tests/animate-path-animation-lL-vV-hH-inverse.js
LayoutTests/svg/animations/script-tests/animate-path-animation-qQ-tT-inverse.js
LayoutTests/svg/animations/script-tests/animate-path-nested-transforms.js
LayoutTests/svg/animations/script-tests/animate-path-to-animation.js
LayoutTests/svg/animations/script-tests/animate-text-nested-transforms.js
LayoutTests/svg/animations/script-tests/animateTransform-pattern-transform.js
LayoutTests/svg/animations/script-tests/svgPreserveAspectRatio-animation-1.js
LayoutTests/svg/animations/script-tests/svgangle-animation-deg-to-grad.js
LayoutTests/svg/animations/script-tests/svgangle-animation-deg-to-rad.js
LayoutTests/svg/animations/script-tests/svgangle-animation-grad-to-deg.js
LayoutTests/svg/animations/script-tests/svgangle-animation-grad-to-rad.js
LayoutTests/svg/animations/script-tests/svgangle-animation-rad-to-deg.js
LayoutTests/svg/animations/script-tests/svgangle-animation-rad-to-grad.js
LayoutTests/svg/animations/script-tests/svgboolean-animation-1.js
LayoutTests/svg/animations/script-tests/svginteger-animation-1.js
LayoutTests/svg/animations/script-tests/svglength-animation-LengthModeHeight.js
LayoutTests/svg/animations/script-tests/svglength-animation-LengthModeOther.js
LayoutTests/svg/animations/script-tests/svglength-animation-LengthModeWidth.js
LayoutTests/svg/animations/script-tests/svglength-animation-invalid-value-1.js
LayoutTests/svg/animations/script-tests/svglength-animation-invalid-value-2.js
LayoutTests/svg/animations/script-tests/svglength-animation-invalid-value-3.js
LayoutTests/svg/animations/script-tests/svglength-animation-number-to-number.js
LayoutTests/svg/animations/script-tests/svglength-animation-px-to-cm.js
LayoutTests/svg/animations/script-tests/svglength-animation-px-to-ems.js
LayoutTests/svg/animations/script-tests/svglength-animation-px-to-exs.js
LayoutTests/svg/animations/script-tests/svglength-animation-px-to-in.js
LayoutTests/svg/animations/script-tests/svglength-animation-px-to-number.js
LayoutTests/svg/animations/script-tests/svglength-animation-px-to-pc.js
LayoutTests/svg/animations/script-tests/svglength-animation-px-to-percentage.js
LayoutTests/svg/animations/script-tests/svglength-animation-px-to-pt.js
LayoutTests/svg/animations/script-tests/svglength-animation-px-to-px.js
LayoutTests/svg/animations/script-tests/svglength-animation-unitType.js
LayoutTests/svg/animations/script-tests/svglength-animation-values.js
LayoutTests/svg/animations/script-tests/svglengthlist-animation-1.js
LayoutTests/svg/animations/script-tests/svglengthlist-animation-2.js
LayoutTests/svg/animations/script-tests/svglengthlist-animation-3.js
LayoutTests/svg/animations/script-tests/svglengthlist-animation-4.js
LayoutTests/svg/animations/script-tests/svglengthlist-animation-5.js
LayoutTests/svg/animations/script-tests/svgnumber-animation-1.js
LayoutTests/svg/animations/script-tests/svgnumber-animation-2.js
LayoutTests/svg/animations/script-tests/svgnumber-animation-3.js
LayoutTests/svg/animations/script-tests/svgnumberlist-animation-1.js
LayoutTests/svg/animations/script-tests/svgnumberlist-animation-2.js
LayoutTests/svg/animations/script-tests/svgnumberoptionalnumber-animation-1.js
LayoutTests/svg/animations/script-tests/svgnumberoptionalnumber-animation-2.js
LayoutTests/svg/animations/script-tests/svgnumberoptionalnumber-animation-3.js
LayoutTests/svg/animations/script-tests/svgnumberoptionalnumber-animation-4.js
LayoutTests/svg/animations/script-tests/svgpath-animation-1.js
LayoutTests/svg/animations/script-tests/svgpointlist-animation-1.js
LayoutTests/svg/animations/script-tests/svgpointlist-animation-2.js
LayoutTests/svg/animations/script-tests/svgrect-animation-1.js
LayoutTests/svg/animations/script-tests/svgrect-animation-2.js
LayoutTests/svg/animations/script-tests/svgstring-animation-fallback-to-discrete.js
LayoutTests/svg/animations/script-tests/svgtransform-animation-1.js
LayoutTests/svg/animations/script-tests/svgtransform-animation-discrete.js
LayoutTests/svg/animations/smil-element-not-removed-crash.html
LayoutTests/svg/animations/svgPreserveAspectRatio-animation-1.html
LayoutTests/svg/animations/svgangle-animation-deg-to-grad-expected.txt
LayoutTests/svg/animations/svgangle-animation-deg-to-grad.html
LayoutTests/svg/animations/svgangle-animation-deg-to-rad-expected.txt
LayoutTests/svg/animations/svgangle-animation-deg-to-rad.html
LayoutTests/svg/animations/svgangle-animation-grad-to-deg-expected.txt
LayoutTests/svg/animations/svgangle-animation-grad-to-deg.html
LayoutTests/svg/animations/svgangle-animation-grad-to-rad-expected.txt
LayoutTests/svg/animations/svgangle-animation-grad-to-rad.html
LayoutTests/svg/animations/svgangle-animation-rad-to-deg-expected.txt
LayoutTests/svg/animations/svgangle-animation-rad-to-deg.html
LayoutTests/svg/animations/svgangle-animation-rad-to-grad-expected.txt
LayoutTests/svg/animations/svgangle-animation-rad-to-grad.html
LayoutTests/svg/animations/svgboolean-animation-1.html
LayoutTests/svg/animations/svginteger-animation-1.html
LayoutTests/svg/animations/svglength-animation-LengthModeHeight-expected.txt
LayoutTests/svg/animations/svglength-animation-LengthModeHeight.html
LayoutTests/svg/animations/svglength-animation-LengthModeOther-expected.txt
LayoutTests/svg/animations/svglength-animation-LengthModeOther.html
LayoutTests/svg/animations/svglength-animation-LengthModeWidth-expected.txt
LayoutTests/svg/animations/svglength-animation-LengthModeWidth.html
LayoutTests/svg/animations/svglength-animation-invalid-value-1.html
LayoutTests/svg/animations/svglength-animation-invalid-value-2.html
LayoutTests/svg/animations/svglength-animation-invalid-value-3.html
LayoutTests/svg/animations/svglength-animation-number-to-number-expected.txt
LayoutTests/svg/animations/svglength-animation-number-to-number.html
LayoutTests/svg/animations/svglength-animation-px-to-cm-expected.txt
LayoutTests/svg/animations/svglength-animation-px-to-cm.html
LayoutTests/svg/animations/svglength-animation-px-to-ems-expected.txt
LayoutTests/svg/animations/svglength-animation-px-to-ems.html
LayoutTests/svg/animations/svglength-animation-px-to-exs-expected.txt
LayoutTests/svg/animations/svglength-animation-px-to-exs.html
LayoutTests/svg/animations/svglength-animation-px-to-in-expected.txt
LayoutTests/svg/animations/svglength-animation-px-to-in.html
LayoutTests/svg/animations/svglength-animation-px-to-number-expected.txt
LayoutTests/svg/animations/svglength-animation-px-to-number.html
LayoutTests/svg/animations/svglength-animation-px-to-pc-expected.txt
LayoutTests/svg/animations/svglength-animation-px-to-pc.html
LayoutTests/svg/animations/svglength-animation-px-to-percentage-expected.txt
LayoutTests/svg/animations/svglength-animation-px-to-percentage.html
LayoutTests/svg/animations/svglength-animation-px-to-pt-expected.txt
LayoutTests/svg/animations/svglength-animation-px-to-pt.html
LayoutTests/svg/animations/svglength-animation-px-to-px-expected.txt
LayoutTests/svg/animations/svglength-animation-px-to-px.html
LayoutTests/svg/animations/svglength-animation-unitType.html
LayoutTests/svg/animations/svglength-animation-values-expected.txt
LayoutTests/svg/animations/svglength-animation-values.html
LayoutTests/svg/animations/svglengthlist-animation-1.html
LayoutTests/svg/animations/svglengthlist-animation-2-expected.txt
LayoutTests/svg/animations/svglengthlist-animation-2.html
LayoutTests/svg/animations/svglengthlist-animation-3.html
LayoutTests/svg/animations/svglengthlist-animation-4.html
LayoutTests/svg/animations/svglengthlist-animation-5.html
LayoutTests/svg/animations/svgnumber-animation-1.html
LayoutTests/svg/animations/svgnumber-animation-2.html
LayoutTests/svg/animations/svgnumber-animation-3.html
LayoutTests/svg/animations/svgnumberlist-animation-1-expected.txt
LayoutTests/svg/animations/svgnumberlist-animation-1.html
LayoutTests/svg/animations/svgnumberlist-animation-2-expected.txt
LayoutTests/svg/animations/svgnumberlist-animation-2.html
LayoutTests/svg/animations/svgnumberoptionalnumber-animation-1.html
LayoutTests/svg/animations/svgnumberoptionalnumber-animation-2.html
LayoutTests/svg/animations/svgnumberoptionalnumber-animation-3.html
LayoutTests/svg/animations/svgnumberoptionalnumber-animation-4.html
LayoutTests/svg/animations/svgpath-animation-1-expected.txt
LayoutTests/svg/animations/svgpath-animation-1.html
LayoutTests/svg/animations/svgpointlist-animation-1-expected.txt
LayoutTests/svg/animations/svgpointlist-animation-1.html
LayoutTests/svg/animations/svgpointlist-animation-2-expected.txt
LayoutTests/svg/animations/svgpointlist-animation-2.html
LayoutTests/svg/animations/svgrect-animation-1-expected.txt
LayoutTests/svg/animations/svgrect-animation-1.html
LayoutTests/svg/animations/svgrect-animation-2-expected.txt
LayoutTests/svg/animations/svgrect-animation-2.html
LayoutTests/svg/animations/svgstring-animation-fallback-to-discrete-expected.txt
LayoutTests/svg/animations/svgstring-animation-fallback-to-discrete.html
LayoutTests/svg/animations/svgtransform-animation-1.html
LayoutTests/svg/animations/svgtransform-animation-discrete-expected.txt
LayoutTests/svg/animations/svgtransform-animation-discrete.html
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.order
Source/WebCore/svg/SVGAnimationElement.cpp
Source/WebCore/svg/SVGDocumentExtensions.cpp
Source/WebCore/svg/SVGDocumentExtensions.h
Source/WebCore/svg/animation/SMILTime.h
Source/WebCore/svg/animation/SMILTimeContainer.cpp
Source/WebCore/svg/animation/SMILTimeContainer.h
Source/WebCore/svg/animation/SVGSMILElement.cpp
Source/WebCore/svg/animation/SVGSMILElement.h
Source/WebCore/svg/svgtags.in
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/public/WebFrame.h
Source/WebKit/chromium/src/WebFrameImpl.cpp
Source/WebKit/chromium/src/WebFrameImpl.h
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebKit.order
Source/WebKit/mac/WebView/WebFrame.mm
Source/WebKit/mac/WebView/WebFramePrivate.h
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
Source/WebKit/win/ChangeLog
Source/WebKit/win/Interfaces/IWebFramePrivate.idl
Source/WebKit/win/WebFrame.cpp
Source/WebKit/win/WebFrame.h
Tools/ChangeLog
Tools/DumpRenderTree/LayoutTestController.cpp
Tools/DumpRenderTree/LayoutTestController.h
Tools/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp
Tools/DumpRenderTree/chromium/LayoutTestController.cpp
Tools/DumpRenderTree/chromium/LayoutTestController.h
Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp
Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm
Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
Tools/DumpRenderTree/qt/LayoutTestControllerQt.h
Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp
Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp

index e979172..29a40cc 100644 (file)
@@ -1,3 +1,420 @@
+2012-02-11  Nikolas Zimmermann  <nzimmermann@rim.com>
+
+        Convert svg/animations to use SMIL methods for driving the timeline
+        https://bugs.webkit.org/show_bug.cgi?id=78422
+
+        Reviewed by Dirk Schulze.
+
+        Switch the svg/animations tests to use SVGSVGElement.setCurrentTime to drive the animation timeline.
+        This should fix all flakiness we previously had with these tests - and as nice side-effect we're now
+        using the standard SVG methods to drive the timeline, and thus have more coverage for these methods.
+        It already exposed several SMIL bugs, that had to be fixed, before this worked.
+
+        This also unifies & cleans up the tests, to use the same formatting and the same shouldBeCloseEnough helpers.
+
+        * svg/animations/animVal-basics-expected.txt:
+        * svg/animations/animVal-basics.html:
+        * svg/animations/animate-calcMode-spline-by-expected.txt:
+        * svg/animations/animate-calcMode-spline-by.html:
+        * svg/animations/animate-calcMode-spline-from-by-expected.txt:
+        * svg/animations/animate-calcMode-spline-from-by.html:
+        * svg/animations/animate-calcMode-spline-from-to-expected.txt:
+        * svg/animations/animate-calcMode-spline-from-to.html:
+        * svg/animations/animate-calcMode-spline-to-expected.txt:
+        * svg/animations/animate-calcMode-spline-to.html:
+        * svg/animations/animate-calcMode-spline-values-expected.txt:
+        * svg/animations/animate-calcMode-spline-values.html:
+        * svg/animations/animate-color-calcMode-discrete.html:
+        * svg/animations/animate-color-fill-currentColor.html:
+        * svg/animations/animate-color-fill-from-by.html:
+        * svg/animations/animate-color-rgba-calcMode-discrete.html:
+        * svg/animations/animate-color-transparent.html:
+        * svg/animations/animate-currentColor.html:
+        * svg/animations/animate-dynamic-update-attributeName.html:
+        * svg/animations/animate-end-attribute-expected.txt:
+        * svg/animations/animate-end-attribute.html:
+        * svg/animations/animate-endElement-beginElement.html:
+        * svg/animations/animate-from-to-keyTimes.html:
+        * svg/animations/animate-gradient-transform.html:
+        * svg/animations/animate-inherit-css-property.html:
+        * svg/animations/animate-insert-begin.html:
+        * svg/animations/animate-insert-no-begin.html:
+        * svg/animations/animate-keySplines.html:
+        * svg/animations/animate-mpath-insert.html:
+        * svg/animations/animate-number-calcMode-discrete-expected.txt:
+        * svg/animations/animate-number-calcMode-discrete-keyTimes.html:
+        * svg/animations/animate-number-calcMode-discrete.html:
+        * svg/animations/animate-path-animation-Cc-Ss-expected.txt:
+        * svg/animations/animate-path-animation-Cc-Ss.html:
+        * svg/animations/animate-path-animation-Ll-Vv-Hh-expected.txt:
+        * svg/animations/animate-path-animation-Ll-Vv-Hh.html:
+        * svg/animations/animate-path-animation-Qq-Tt.html:
+        * svg/animations/animate-path-animation-cC-sS-inverse-expected.txt:
+        * svg/animations/animate-path-animation-cC-sS-inverse.html:
+        * svg/animations/animate-path-animation-lL-vV-hH-inverse-expected.txt:
+        * svg/animations/animate-path-animation-lL-vV-hH-inverse.html:
+        * svg/animations/animate-path-animation-qQ-tT-inverse.html:
+        * svg/animations/animate-path-nested-transforms-expected.txt:
+        * svg/animations/animate-path-nested-transforms.html:
+        * svg/animations/animate-path-to-animation-expected.txt:
+        * svg/animations/animate-path-to-animation.html:
+        * svg/animations/animate-text-nested-transforms-expected.txt:
+        * svg/animations/animate-text-nested-transforms.html:
+        * svg/animations/animateTransform-pattern-transform.html:
+        * svg/animations/resources/SVGAnimationTestCase.js:
+        (isCloseEnough):
+        (shouldBeCloseEnough):
+        (moveAnimationTimelineAndSample):
+        (sampleAnimation):
+        (runSMILTest):
+        (runAnimationTest):
+        * svg/animations/script-tests/TEMPLATE.html: Removed.
+        * svg/animations/script-tests/animVal-basics.js:
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/animate-calcMode-spline-by.js:
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/animate-calcMode-spline-from-by.js:
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/animate-calcMode-spline-from-to.js:
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/animate-calcMode-spline-to.js:
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/animate-calcMode-spline-values.js:
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/animate-color-calcMode-discrete.js:
+        (executeTest):
+        * svg/animations/script-tests/animate-color-fill-currentColor.js:
+        (executeTest):
+        * svg/animations/script-tests/animate-color-fill-from-by.js:
+        (executeTest):
+        * svg/animations/script-tests/animate-color-rgba-calcMode-discrete.js:
+        (executeTest):
+        * svg/animations/script-tests/animate-color-transparent.js:
+        (executeTest):
+        * svg/animations/script-tests/animate-currentColor.js:
+        (executeTest):
+        * svg/animations/script-tests/animate-dynamic-update-attributeName.js:
+        (executeTest):
+        * svg/animations/script-tests/animate-end-attribute.js:
+        (sample1):
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/animate-endElement-beginElement.js:
+        (executeTest):
+        (end):
+        (begin):
+        * svg/animations/script-tests/animate-from-to-keyTimes.js:
+        (executeTest):
+        * svg/animations/script-tests/animate-gradient-transform.js:
+        (executeTest):
+        * svg/animations/script-tests/animate-inherit-css-property.js:
+        (executeTest):
+        * svg/animations/script-tests/animate-insert-begin.js:
+        (executeTest):
+        * svg/animations/script-tests/animate-insert-no-begin.js:
+        (executeTest):
+        * svg/animations/script-tests/animate-keySplines.js:
+        (executeTest):
+        * svg/animations/script-tests/animate-mpath-insert.js:
+        (executeTest):
+        * svg/animations/script-tests/animate-number-calcMode-discrete-keyTimes.js:
+        (executeTest):
+        * svg/animations/script-tests/animate-number-calcMode-discrete.js:
+        (sample1):
+        (sample2):
+        (executeTest):
+        * svg/animations/script-tests/animate-path-animation-Cc-Ss.js:
+        (sample4):
+        (executeTest):
+        * svg/animations/script-tests/animate-path-animation-Ll-Vv-Hh.js:
+        (sample4):
+        (executeTest):
+        * svg/animations/script-tests/animate-path-animation-Qq-Tt.js:
+        (executeTest):
+        * svg/animations/script-tests/animate-path-animation-cC-sS-inverse.js:
+        (sample4):
+        (executeTest):
+        * svg/animations/script-tests/animate-path-animation-lL-vV-hH-inverse.js:
+        (sample4):
+        (executeTest):
+        * svg/animations/script-tests/animate-path-animation-qQ-tT-inverse.js:
+        (executeTest):
+        * svg/animations/script-tests/animate-path-nested-transforms.js:
+        (g.setAttribute.rect.createSVGElement.rect.setAttribute.rect.setAttribute.rect.setAttribute.rect.setAttribute.rect.setAttribute.g.appendChild.animateMotion.createSVGElement.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.g.appendChild.rootSVGElement.appendChild.startSample):
+        (endSample):
+        (executeTest):
+        * svg/animations/script-tests/animate-path-to-animation.js:
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/animate-text-nested-transforms.js:
+        (rootSVGElement.setAttribute.text.createSVGElement.text.setAttribute.text.textContent.string_appeared_here.text.setAttribute.animateMotion.createSVGElement.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.animateMotion.setAttribute.text.appendChild.rootSVGElement.appendChild.startSample):
+        (endSample):
+        (executeTest):
+        * svg/animations/script-tests/animateTransform-pattern-transform.js:
+        (executeTest):
+        * svg/animations/script-tests/svgPreserveAspectRatio-animation-1.js:
+        (sample1):
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svgangle-animation-deg-to-grad.js:
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svgangle-animation-deg-to-rad.js:
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svgangle-animation-grad-to-deg.js:
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svgangle-animation-grad-to-rad.js:
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svgangle-animation-rad-to-deg.js:
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svgangle-animation-rad-to-grad.js:
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svgboolean-animation-1.js:
+        (sample1):
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svginteger-animation-1.js:
+        (sample1):
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svglength-animation-LengthModeHeight.js:
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svglength-animation-LengthModeOther.js:
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svglength-animation-LengthModeWidth.js:
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svglength-animation-invalid-value-1.js:
+        (executeTest):
+        * svg/animations/script-tests/svglength-animation-invalid-value-2.js:
+        (executeTest):
+        * svg/animations/script-tests/svglength-animation-invalid-value-3.js:
+        (executeTest):
+        * svg/animations/script-tests/svglength-animation-number-to-number.js:
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svglength-animation-px-to-cm.js:
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svglength-animation-px-to-ems.js:
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svglength-animation-px-to-exs.js:
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svglength-animation-px-to-in.js:
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svglength-animation-px-to-number.js:
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svglength-animation-px-to-pc.js:
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svglength-animation-px-to-percentage.js:
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svglength-animation-px-to-pt.js:
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svglength-animation-px-to-px.js:
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svglength-animation-unitType.js:
+        (executeTest):
+        * svg/animations/script-tests/svglength-animation-values.js:
+        (sample5):
+        (executeTest):
+        * svg/animations/script-tests/svglengthlist-animation-1.js:
+        (sample1):
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svglengthlist-animation-2.js:
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svglengthlist-animation-3.js:
+        (sample1):
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svglengthlist-animation-4.js:
+        (sample1):
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svglengthlist-animation-5.js:
+        (sample1):
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svgnumber-animation-1.js:
+        (executeTest):
+        * svg/animations/script-tests/svgnumber-animation-2.js:
+        (executeTest):
+        * svg/animations/script-tests/svgnumber-animation-3.js:
+        (executeTest):
+        * svg/animations/script-tests/svgnumberlist-animation-1.js:
+        (sample1):
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svgnumberlist-animation-2.js:
+        (sample1):
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svgnumberoptionalnumber-animation-1.js:
+        (sample1):
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svgnumberoptionalnumber-animation-2.js:
+        (sample1):
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svgnumberoptionalnumber-animation-3.js:
+        (sample1):
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svgnumberoptionalnumber-animation-4.js:
+        (sample1):
+        (sample2):
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svgpath-animation-1.js:
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svgpointlist-animation-1.js:
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svgpointlist-animation-2.js:
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svgrect-animation-1.js:
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svgrect-animation-2.js:
+        (sample3):
+        (executeTest):
+        * svg/animations/script-tests/svgstring-animation-fallback-to-discrete.js:
+        (executeTest):
+        * svg/animations/script-tests/svgtransform-animation-1.js:
+        (executeTest):
+        * svg/animations/script-tests/svgtransform-animation-discrete.js:
+        (executeTest):
+        * svg/animations/smil-element-not-removed-crash.html:
+        * svg/animations/svgPreserveAspectRatio-animation-1.html:
+        * svg/animations/svgangle-animation-deg-to-grad-expected.txt:
+        * svg/animations/svgangle-animation-deg-to-grad.html:
+        * svg/animations/svgangle-animation-deg-to-rad-expected.txt:
+        * svg/animations/svgangle-animation-deg-to-rad.html:
+        * svg/animations/svgangle-animation-grad-to-deg-expected.txt:
+        * svg/animations/svgangle-animation-grad-to-deg.html:
+        * svg/animations/svgangle-animation-grad-to-rad-expected.txt:
+        * svg/animations/svgangle-animation-grad-to-rad.html:
+        * svg/animations/svgangle-animation-rad-to-deg-expected.txt:
+        * svg/animations/svgangle-animation-rad-to-deg.html:
+        * svg/animations/svgangle-animation-rad-to-grad-expected.txt:
+        * svg/animations/svgangle-animation-rad-to-grad.html:
+        * svg/animations/svgboolean-animation-1.html:
+        * svg/animations/svginteger-animation-1.html:
+        * svg/animations/svglength-animation-LengthModeHeight-expected.txt:
+        * svg/animations/svglength-animation-LengthModeHeight.html:
+        * svg/animations/svglength-animation-LengthModeOther-expected.txt:
+        * svg/animations/svglength-animation-LengthModeOther.html:
+        * svg/animations/svglength-animation-LengthModeWidth-expected.txt:
+        * svg/animations/svglength-animation-LengthModeWidth.html:
+        * svg/animations/svglength-animation-invalid-value-1.html:
+        * svg/animations/svglength-animation-invalid-value-2.html:
+        * svg/animations/svglength-animation-invalid-value-3.html:
+        * svg/animations/svglength-animation-number-to-number-expected.txt:
+        * svg/animations/svglength-animation-number-to-number.html:
+        * svg/animations/svglength-animation-px-to-cm-expected.txt:
+        * svg/animations/svglength-animation-px-to-cm.html:
+        * svg/animations/svglength-animation-px-to-ems-expected.txt:
+        * svg/animations/svglength-animation-px-to-ems.html:
+        * svg/animations/svglength-animation-px-to-exs-expected.txt:
+        * svg/animations/svglength-animation-px-to-exs.html:
+        * svg/animations/svglength-animation-px-to-in-expected.txt:
+        * svg/animations/svglength-animation-px-to-in.html:
+        * svg/animations/svglength-animation-px-to-number-expected.txt:
+        * svg/animations/svglength-animation-px-to-number.html:
+        * svg/animations/svglength-animation-px-to-pc-expected.txt:
+        * svg/animations/svglength-animation-px-to-pc.html:
+        * svg/animations/svglength-animation-px-to-percentage-expected.txt:
+        * svg/animations/svglength-animation-px-to-percentage.html:
+        * svg/animations/svglength-animation-px-to-pt-expected.txt:
+        * svg/animations/svglength-animation-px-to-pt.html:
+        * svg/animations/svglength-animation-px-to-px-expected.txt:
+        * svg/animations/svglength-animation-px-to-px.html:
+        * svg/animations/svglength-animation-unitType.html:
+        * svg/animations/svglength-animation-values-expected.txt:
+        * svg/animations/svglength-animation-values.html:
+        * svg/animations/svglengthlist-animation-1.html:
+        * svg/animations/svglengthlist-animation-2-expected.txt:
+        * svg/animations/svglengthlist-animation-2.html:
+        * svg/animations/svglengthlist-animation-3.html:
+        * svg/animations/svglengthlist-animation-4.html:
+        * svg/animations/svglengthlist-animation-5.html:
+        * svg/animations/svgnumber-animation-1.html:
+        * svg/animations/svgnumber-animation-2.html:
+        * svg/animations/svgnumber-animation-3.html:
+        * svg/animations/svgnumberlist-animation-1-expected.txt:
+        * svg/animations/svgnumberlist-animation-1.html:
+        * svg/animations/svgnumberlist-animation-2-expected.txt:
+        * svg/animations/svgnumberlist-animation-2.html:
+        * svg/animations/svgnumberoptionalnumber-animation-1.html:
+        * svg/animations/svgnumberoptionalnumber-animation-2.html:
+        * svg/animations/svgnumberoptionalnumber-animation-3.html:
+        * svg/animations/svgnumberoptionalnumber-animation-4.html:
+        * svg/animations/svgpath-animation-1-expected.txt:
+        * svg/animations/svgpath-animation-1.html:
+        * svg/animations/svgpointlist-animation-1-expected.txt:
+        * svg/animations/svgpointlist-animation-1.html:
+        * svg/animations/svgpointlist-animation-2-expected.txt:
+        * svg/animations/svgpointlist-animation-2.html:
+        * svg/animations/svgrect-animation-1-expected.txt:
+        * svg/animations/svgrect-animation-1.html:
+        * svg/animations/svgrect-animation-2-expected.txt:
+        * svg/animations/svgrect-animation-2.html:
+        * svg/animations/svgstring-animation-fallback-to-discrete-expected.txt:
+        * svg/animations/svgstring-animation-fallback-to-discrete.html:
+        * svg/animations/svgtransform-animation-1.html:
+        * svg/animations/svgtransform-animation-discrete-expected.txt:
+        * svg/animations/svgtransform-animation-discrete.html:
+
 2012-02-14  Pavel Feldman  <pfeldman@chromium.org>
 
         Web Inspector: [REGRESSION] Copy Stack Trace is broken
index dc7b0a1..2284963 100644 (file)
@@ -9,8 +9,8 @@ PASS rect.width.animVal.value is 200
 PASS rect.width.baseVal.value is 200
 PASS rect.width.animVal.value is 150
 PASS rect.width.baseVal.value is 150
-PASS rect.width.animVal.value is almost 100, just before-end
-PASS rect.width.baseVal.value is almost 100, just before-end
+PASS rect.width.animVal.value is 100
+PASS rect.width.baseVal.value is 100
 PASS rect.width.animVal.value is 200
 PASS rect.width.baseVal.value is 200
 PASS successfullyParsed is true
index 0ea6cf2..711d75b 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 2628d72..0fb6a50 100644 (file)
@@ -7,10 +7,10 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 PASS rect.x.animVal.value is 100
 PASS rect.x.baseVal.value is 100
-PASS rect.x.animVal.value is almost 18.8, after first half
-PASS rect.x.baseVal.value is almost 18.8, after first half
-PASS rect.x.animVal.value is almost 0, just before-end
-PASS rect.x.baseVal.value is almost 0, just before-end
+PASS rect.x.animVal.value is 18.8
+PASS rect.x.baseVal.value is 18.8
+PASS rect.x.animVal.value is 0.01
+PASS rect.x.baseVal.value is 0.01
 PASS rect.x.animVal.value is 100
 PASS rect.x.baseVal.value is 100
 PASS successfullyParsed is true
index 55dcbcf..ca2f8c2 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index c0bbc24..5de8180 100644 (file)
@@ -7,10 +7,10 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 PASS rect.x.animVal.value is 100
 PASS rect.x.baseVal.value is 100
-PASS rect.x.animVal.value is almost 18.8, after first half
-PASS rect.x.baseVal.value is almost 18.8, after first half
-PASS rect.x.animVal.value is almost 0, just before-end
-PASS rect.x.baseVal.value is almost 0, just before-end
+PASS rect.x.animVal.value is 18.8
+PASS rect.x.baseVal.value is 18.8
+PASS rect.x.animVal.value is 0.01
+PASS rect.x.baseVal.value is 0.01
 PASS rect.x.animVal.value is 100
 PASS rect.x.baseVal.value is 100
 PASS successfullyParsed is true
index d12af86..89a23c8 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index a6192ca..f3880f6 100644 (file)
@@ -7,10 +7,10 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 PASS rect.x.animVal.value is 100
 PASS rect.x.baseVal.value is 100
-PASS rect.x.animVal.value is almost 18.8, after first half
-PASS rect.x.baseVal.value is almost 18.8, after first half
-PASS rect.x.animVal.value is almost 0, just before-end
-PASS rect.x.baseVal.value is almost 0, just before-end
+PASS rect.x.animVal.value is 18.8
+PASS rect.x.baseVal.value is 18.8
+PASS rect.x.animVal.value is 0.01
+PASS rect.x.baseVal.value is 0.01
 PASS rect.x.animVal.value is 100
 PASS rect.x.baseVal.value is 100
 PASS successfullyParsed is true
index dca2607..37aa83e 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 71e3902..cd656c6 100644 (file)
@@ -7,10 +7,10 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 PASS rect.x.animVal.value is 100
 PASS rect.x.baseVal.value is 100
-PASS rect.x.animVal.value is almost 18.8, after first half
-PASS rect.x.baseVal.value is almost 18.8, after first half
-PASS rect.x.animVal.value is almost 0, just before-end
-PASS rect.x.baseVal.value is almost 0, just before-end
+PASS rect.x.animVal.value is 18.8
+PASS rect.x.baseVal.value is 18.8
+PASS rect.x.animVal.value is 0.01
+PASS rect.x.baseVal.value is 0.01
 PASS rect.x.animVal.value is 100
 PASS rect.x.baseVal.value is 100
 PASS successfullyParsed is true
index 26b0e81..6e2edb5 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index f6eaa9a..c2e6d7f 100644 (file)
@@ -7,10 +7,10 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 PASS rect.x.animVal.value is 100
 PASS rect.x.baseVal.value is 100
-PASS rect.x.animVal.value is almost 18.8, after first half
-PASS rect.x.baseVal.value is almost 18.8, after first half
-PASS rect.x.animVal.value is almost 0, just before-end
-PASS rect.x.baseVal.value is almost 0, just before-end
+PASS rect.x.animVal.value is 18.8
+PASS rect.x.baseVal.value is 18.8
+PASS rect.x.animVal.value is 0.01
+PASS rect.x.baseVal.value is 0.01
 PASS rect.x.animVal.value is 100
 PASS rect.x.baseVal.value is 100
 PASS successfullyParsed is true
index b3336bd..14c11f3 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index b254253..0bce948 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index ce401c2..db4a53b 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 34cf4e3..96e99d7 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 69ad41a..58ca6a6 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 8c0bbd4..54a10af 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 2fed609..a131337 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 146dd86..000a7bf 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 2aa588a..912af0c 100644 (file)
@@ -1,8 +1,12 @@
 SVG 1.1 dynamic animation tests
 
+PASS rect.x.animVal.value is 100
 PASS rect.x.baseVal.value is 100
+PASS rect.x.animVal.value is 50
 PASS rect.x.baseVal.value is 50
+PASS rect.x.animVal.value is 200
 PASS rect.x.baseVal.value is 200
+PASS rect.x.animVal.value is 200
 PASS rect.x.baseVal.value is 200
 PASS successfullyParsed is true
 
index d681ef9..31a796e 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 8adcab5..0376545 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 0bb2030..b9ae50c 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index c9e89c5..d7998b6 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 6fe8de6..9305a38 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index b9abae3..fde950d 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 5e81b0c..acfbff0 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 305750b..20bbaaa 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index b82a79f..a186f7d 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 3abe37f..3fb74b8 100644 (file)
@@ -5,11 +5,11 @@ Test calcMode discrete with from-to animation on numbers. You should see a green
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS rect.x.baseVal.value is 100
-PASS rect.x.baseVal.value is 100
-PASS rect.x.baseVal.value is 0
-PASS rect.x.baseVal.value is 0
-PASS rect.x.baseVal.value is 100
+PASS rect.x.animVal.value is 100
+PASS rect.x.animVal.value is 100
+PASS rect.x.animVal.value is 0
+PASS rect.x.animVal.value is 0
+PASS rect.x.animVal.value is 100
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 960396c..767c13a 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 2edef72..f9452a2 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 135495e..670c3fc 100644 (file)
@@ -56,15 +56,15 @@ PASS path.pathSegList.getItem(0).y is -20
 PASS path.pathSegList.getItem(1).pathSegTypeAsLetter is 'c'
 PASS path.pathSegList.getItem(1).x is 40
 PASS path.pathSegList.getItem(1).y is 40
-PASS path.pathSegList.getItem(1).x1 is 0
+PASS path.pathSegList.getItem(1).x1 is 0.01
 PASS path.pathSegList.getItem(1).y1 is 40
-PASS path.pathSegList.getItem(1).x2 is 0
+PASS path.pathSegList.getItem(1).x2 is 0.01
 PASS path.pathSegList.getItem(1).y2 is 40
 PASS path.pathSegList.getItem(2).pathSegTypeAsLetter is 's'
-PASS path.pathSegList.getItem(2).x is 0
+PASS path.pathSegList.getItem(2).x is -0.01
 PASS path.pathSegList.getItem(2).y is -40
 PASS path.pathSegList.getItem(2).x2 is 40
-PASS path.pathSegList.getItem(2).y2 is 0
+PASS path.pathSegList.getItem(2).y2 is 0.01
 PASS path.pathSegList.getItem(0).pathSegTypeAsLetter is 'M'
 PASS path.pathSegList.getItem(0).x is -20
 PASS path.pathSegList.getItem(0).y is -20
index e0c22e7..a270384 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 715fa61..09a35ed 100644 (file)
@@ -36,15 +36,15 @@ PASS path.pathSegList.getItem(2).y is -15
 PASS path.pathSegList.getItem(3).pathSegTypeAsLetter is 'h'
 PASS path.pathSegList.getItem(3).x is 15
 PASS path.pathSegList.getItem(0).pathSegTypeAsLetter is 'M'
-PASS path.pathSegList.getItem(0).x is 30
-PASS path.pathSegList.getItem(0).y is 30
+PASS path.pathSegList.getItem(0).x is 29.98
+PASS path.pathSegList.getItem(0).y is 29.98
 PASS path.pathSegList.getItem(1).pathSegTypeAsLetter is 'l'
-PASS path.pathSegList.getItem(1).x is -60
-PASS path.pathSegList.getItem(1).y is -30
+PASS path.pathSegList.getItem(1).x is -59.98
+PASS path.pathSegList.getItem(1).y is -29.98
 PASS path.pathSegList.getItem(2).pathSegTypeAsLetter is 'v'
-PASS path.pathSegList.getItem(2).y is -30
+PASS path.pathSegList.getItem(2).y is -29.98
 PASS path.pathSegList.getItem(3).pathSegTypeAsLetter is 'h'
-PASS path.pathSegList.getItem(3).x is 30
+PASS path.pathSegList.getItem(3).x is 29.98
 PASS path.pathSegList.getItem(0).pathSegTypeAsLetter is 'M'
 PASS path.pathSegList.getItem(0).x is -30
 PASS path.pathSegList.getItem(0).y is -30
index 39f0239..2b8814b 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index fc57466..e3e6f6e 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 764d34e..60ad657 100644 (file)
@@ -56,14 +56,14 @@ PASS path.pathSegList.getItem(0).y is -20
 PASS path.pathSegList.getItem(1).pathSegTypeAsLetter is 'C'
 PASS path.pathSegList.getItem(1).x is 20
 PASS path.pathSegList.getItem(1).y is 20
-PASS path.pathSegList.getItem(1).x1 is 20
-PASS path.pathSegList.getItem(1).y1 is -20
-PASS path.pathSegList.getItem(1).x2 is 20
-PASS path.pathSegList.getItem(1).y2 is -20
+PASS path.pathSegList.getItem(1).x1 is 19.98
+PASS path.pathSegList.getItem(1).y1 is -19.98
+PASS path.pathSegList.getItem(1).x2 is 19.98
+PASS path.pathSegList.getItem(1).y2 is -19.98
 PASS path.pathSegList.getItem(2).pathSegTypeAsLetter is 'S'
-PASS path.pathSegList.getItem(2).x is -20
-PASS path.pathSegList.getItem(2).y is 20
-PASS path.pathSegList.getItem(2).x2 is 20
+PASS path.pathSegList.getItem(2).x is -19.98
+PASS path.pathSegList.getItem(2).y is 19.98
+PASS path.pathSegList.getItem(2).x2 is 20.01
 PASS path.pathSegList.getItem(2).y2 is 40
 PASS path.pathSegList.getItem(0).pathSegTypeAsLetter is 'M'
 PASS path.pathSegList.getItem(0).x is -20
index 6e801c5..ceaa2ac 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 9b8747e..c41c094 100644 (file)
@@ -36,13 +36,13 @@ PASS path.pathSegList.getItem(2).y is 15
 PASS path.pathSegList.getItem(3).pathSegTypeAsLetter is 'H'
 PASS path.pathSegList.getItem(3).x is 0
 PASS path.pathSegList.getItem(0).pathSegTypeAsLetter is 'M'
-PASS path.pathSegList.getItem(0).x is -30
-PASS path.pathSegList.getItem(0).y is -30
+PASS path.pathSegList.getItem(0).x is -29.98
+PASS path.pathSegList.getItem(0).y is -29.98
 PASS path.pathSegList.getItem(1).pathSegTypeAsLetter is 'L'
-PASS path.pathSegList.getItem(1).x is 30
+PASS path.pathSegList.getItem(1).x is 29.98
 PASS path.pathSegList.getItem(1).y is 0
 PASS path.pathSegList.getItem(2).pathSegTypeAsLetter is 'V'
-PASS path.pathSegList.getItem(2).y is 30
+PASS path.pathSegList.getItem(2).y is 29.98
 PASS path.pathSegList.getItem(3).pathSegTypeAsLetter is 'H'
 PASS path.pathSegList.getItem(3).x is 0
 PASS path.pathSegList.getItem(0).pathSegTypeAsLetter is 'M'
index 3dc201c..8975699 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index b129413..270c0de 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index d0d0afd..9368b7c 100644 (file)
@@ -5,10 +5,10 @@ test to determine whether auto-rotate animateMotion path animations pre-muliply
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS rootSVGElement.getBBox().x is almost 132 (within 20)
-PASS rootSVGElement.getBBox().y is almost -90 (within 20)
-PASS rootSVGElement.getBBox().x is almost 332 (within 20)
-PASS rootSVGElement.getBBox().y is almost 550 (within 20)
+PASS rootSVGElement.getBBox().x is 132
+PASS rootSVGElement.getBBox().y is -90
+PASS rootSVGElement.getBBox().x is 332
+PASS rootSVGElement.getBBox().y is 550
 PASS successfullyParsed is true
 
 TEST COMPLETE
index fd130c2..738b4de 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 682b5c5..53ad72c 100644 (file)
@@ -7,10 +7,10 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 PASS path.pathSegList.getItem(0).x is 40
 PASS path.pathSegList.getItem(0).y is 40
-PASS path.pathSegList.getItem(0).x is almost 20, after first half
-PASS path.pathSegList.getItem(0).y is almost 20, after first half
-PASS path.pathSegList.getItem(0).x is almost 0, after first half
-PASS path.pathSegList.getItem(0).y is almost 0, after first half
+PASS path.pathSegList.getItem(0).x is 20
+PASS path.pathSegList.getItem(0).y is 20
+PASS path.pathSegList.getItem(0).x is 0.01
+PASS path.pathSegList.getItem(0).y is 0.01
 PASS path.pathSegList.getItem(0).x is 40
 PASS path.pathSegList.getItem(0).y is 40
 PASS successfullyParsed is true
index 370f483..23f71a5 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index a72da03..3edd6d3 100644 (file)
@@ -6,10 +6,10 @@ test to determine whether auto-rotate animateMotion path animations pre-muliply
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS rootSVGElement.getBBox().x is almost 196 (within 20)
-PASS rootSVGElement.getBBox().y is almost -186 (within 20)
-PASS rootSVGElement.getBBox().x is almost 370 (within 20)
-PASS rootSVGElement.getBBox().y is almost 547 (within 20)
+PASS rootSVGElement.getBBox().x is 118.65
+PASS rootSVGElement.getBBox().y is -161.03
+PASS rootSVGElement.getBBox().x is 366.89
+PASS rootSVGElement.getBBox().y is 549.93
 PASS successfullyParsed is true
 
 TEST COMPLETE
index b2418ff..1d1fbb1 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index b2d3ebf..a05f6fd 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 6ef6738..6d40c67 100644 (file)
@@ -1,14 +1,12 @@
 // Inspired by Layoutests/animations/animation-test-helpers.js
 // Modified to work with SVG and together with LayoutTests/svg/dynamic-updates/resources/SVGTestCase.js
 
-function isCloseEnough(actual, desired, tolerance)
-{
+function isCloseEnough(actual, desired, tolerance) {
     var diff = Math.abs(actual - desired);
     return diff <= tolerance;
 }
 
-function shouldBeCloseEnough(_a, _b, tolerance)
-{
+function shouldBeCloseEnough(_a, _b, tolerance) {
     if (typeof _a != "string" || typeof _b != "string" || typeof tolerance != "number")
         debug("WARN: shouldBeCloseEnough() expects two string and one number arguments");
     var exception;
@@ -30,47 +28,31 @@ function shouldBeCloseEnough(_a, _b, tolerance)
         testFailed(_a + " should be close to " + _bv + " (of type " + typeof _bv + "). Was " + _av + " (of type " + typeof _av + ").");
 }
 
-function moveAnimationTimelineAndSample(index)
-{
+function moveAnimationTimelineAndSample(index) {
     var animationId = expectedResults[index][0];
     var time = expectedResults[index][1];
-    var elementId = expectedResults[index][2];
-    var sampleCallback = expectedResults[index][3];
+    var sampleCallback = expectedResults[index][2];
+    var animation = document.getElementById(animationId);
 
-    if (!layoutTestController.sampleSVGAnimationForElementAtTime(animationId, time, elementId)) {
-        testFailed("animation \"" + animationId + "\" is not running");
-        return;
+    // If we want to sample the animation end, add a small delta, to reliable point past the end of the animation.
+    newTime = time;
+
+    try {
+        if (newTime == animation.getSimpleDuration())
+            newTime += 0.01;
+        newTime += animation.getStartTime();
+    } catch(e) {
+        debug('Exception thrown: ' + e);
     }
 
+    // The sample time is relative to the start time of the animation, take that into account.
+    rootSVGElement.setCurrentTime(newTime);
     sampleCallback();
 }
 
 var currentTest = 0;
 var expectedResults;
 
-function startTest(callback) {
-    if (currentTest > 0)
-        throw("Not allowed to call startTest() twice");
-
-    testCount = expectedResults.length;
-    currentTest = 0;
-
-    if (callback)
-        callback();
-
-    // Immediately sample, if the first time is 0
-    if (expectedResults[0][1] == '0') {
-        expectedResults[0][3]();
-        ++currentTest;
-    }
-
-    // We may have just sampled on animation-begin, give the
-    // document some time to invoke the SVG animation.
-    // If we fix the animation to start with the SVGLoad event
-    // not on implicitClose(), we can even avoid this hack.
-    window.setTimeout(sampleAnimation, 0);
-}
-
 function sampleAnimation() {
     if (currentTest == expectedResults.length) {
         completeTest();
@@ -80,22 +62,50 @@ function sampleAnimation() {
     moveAnimationTimelineAndSample(currentTest);
     ++currentTest;
 
-    sampleAnimation();
+    setTimeout(sampleAnimation, 0);
 }
 
-var hasPauseAnimationAPI;
-var globalCallback;
+function runSMILTest() {
+    // 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) {
+        executeTest();
+        return;
+    }
 
-function runAnimationTest(expected, callback)
-{
+    var useX = 50;
+    var useY = 50;
+    if (window.clickX)
+        useX = window.clickX;
+    if (window.clickY)
+        useY = window.clickY;
+    setTimeout("triggerUpdate(" + useX + "," + useY + ")", 0);
+}
+
+function runAnimationTest(expected) {
     if (!expected)
         throw("Expected results are missing!");
+    if (currentTest > 0)
+        throw("Not allowed to call runAnimationTest() twice");
+
+    if (window.layoutTestController)
+        layoutTestController.waitUntilDone();
 
     expectedResults = expected;
+    testCount = expectedResults.length;
+    currentTest = 0;
+
+    // Immediately sample, if the first time is zero.
+    if (expectedResults[0][1] == 0) {
+        expectedResults[0][2]();
+        ++currentTest;
+    }
 
-    hasPauseAnimationAPI = ('layoutTestController' in window) && ('sampleSVGAnimationForElementAtTime' in layoutTestController);
-    if (!hasPauseAnimationAPI)
-        throw("SVG animation pause API missing!");
+    // Pause animations, we'll drive them manually.
+    rootSVGElement.pauseAnimations();
 
-    startTest(callback);
+    if (window.layoutTestController)
+        setTimeout(sampleAnimation, 0);
+    else
+        setTimeout(sampleAnimation, 50);
 }
diff --git a/LayoutTests/svg/animations/script-tests/TEMPLATE.html b/LayoutTests/svg/animations/script-tests/TEMPLATE.html
deleted file mode 100644 (file)
index ba3c4ad..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../dynamic-updates/resources/SVGTestCase.js"></script>
-<script src="resources/SVGAnimationTestCase.js"></script>
-</head>
-<body>
-<h1>SVG 1.1 dynamic animation tests</h1>
-<p id="description"></p>
-<div id="console"></div>
-<script src="YOUR_JS_FILE_HERE"></script>
-</body>
-</html>
index b80d15b..16559e9 100644 (file)
@@ -28,46 +28,27 @@ function sample1() {
 }
 
 function sample2() {
-    // FIXME: Add animVal support. Animates baseVal at the moment.
-    // shouldBe("rect.width.animVal.value", "150");
-    // shouldBe("rect.width.baseVal.value", "200");
-
     // Check half-time conditions
     shouldBe("rect.width.animVal.value", "150");
     shouldBe("rect.width.baseVal.value", "150");
 }
 
 function sample3() {
-    // FIXME: Add animVal support. Animates baseVal at the moment.
-    // shouldBe("rect.width.animVal.value", "100");
-    // shouldBe("rect.width.baseVal.value", "200");
-
     // Check just before-end conditions
-    var ok = isCloseEnough(rect.width.animVal.value, 100, 0.01);
-    if (ok)
-        testPassed("rect.width.animVal.value is almost 100, just before-end");
-    else
-        testFailed("rect.width.animVal.value is NOT almost 100, as expected");
-
-    ok = isCloseEnough(rect.width.baseVal.value, 100, 0.01);
-    if (ok)
-        testPassed("rect.width.baseVal.value is almost 100, just before-end");
-    else
-        testFailed("rect.width.baseVal.value is NOT almost 100, as expected");
+    shouldBeCloseEnough("rect.width.animVal.value", "100", 1);
+    shouldBeCloseEnough("rect.width.baseVal.value", "100", 1);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(15, 30)", 0);
 var successfullyParsed = true;
index 298b9d8..5075881 100644 (file)
@@ -30,50 +30,28 @@ function sample1() {
 }
 
 function sample2() {
-    var ok = isCloseEnough(rect.x.animVal.value, 18.8, 0.01);
-    if (ok)
-        testPassed("rect.x.animVal.value is almost 18.8, after first half");
-    else
-        testFailed("rect.x.animVal.value is NOT almost 51, as expected");
-
-    ok = isCloseEnough(rect.x.baseVal.value, 18.8, 0.01);
-    if (ok)
-        testPassed("rect.x.baseVal.value is almost 18.8, after first half");
-    else
-        testFailed("rect.x.baseVal.value is NOT almost 18.8, as expected");
+    // Check half-time conditions
+    shouldBeCloseEnough("rect.x.animVal.value", "18.8", 0.01);
+    shouldBeCloseEnough("rect.x.baseVal.value", "18.8", 0.01);
 }
 
 function sample3() {
-    // FIXME: Add animVal support. Animates baseVal at the moment.
-    // shouldBe("rect.x.animVal.value", "0");
-    // shouldBe("rect.x.baseVal.value", "200");
-
     // Check just before-end conditions
-    var ok = isCloseEnough(rect.x.animVal.value, 0, 0.01);
-    if (ok)
-        testPassed("rect.x.animVal.value is almost 0, just before-end");
-    else
-        testFailed("rect.x.animVal.value is NOT almost 0, as expected");
-
-    ok = isCloseEnough(rect.x.baseVal.value, 0, 0.01);
-    if (ok)
-        testPassed("rect.x.baseVal.value is almost 0, just before-end");
-    else
-        testFailed("rect.x.baseVal.value is NOT almost 0, as expected");
+    shouldBeCloseEnough("rect.x.animVal.value", "0.01", 0.01);
+    shouldBeCloseEnough("rect.x.baseVal.value", "0.01", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(150, 30)", 0);
+window.clickX = 150;
 var successfullyParsed = true;
index b2fd9d1..0f6c9a9 100644 (file)
@@ -31,50 +31,28 @@ function sample1() {
 }
 
 function sample2() {
-    var ok = isCloseEnough(rect.x.animVal.value, 18.8, 0.01);
-    if (ok)
-        testPassed("rect.x.animVal.value is almost 18.8, after first half");
-    else
-        testFailed("rect.x.animVal.value is NOT almost 51, as expected");
-
-    ok = isCloseEnough(rect.x.baseVal.value, 18.8, 0.01);
-    if (ok)
-        testPassed("rect.x.baseVal.value is almost 18.8, after first half");
-    else
-        testFailed("rect.x.baseVal.value is NOT almost 18.8, as expected");
+    // Check half-time conditions
+    shouldBeCloseEnough("rect.x.animVal.value", "18.8", 0.01);
+    shouldBeCloseEnough("rect.x.baseVal.value", "18.8", 0.01);
 }
 
 function sample3() {
-    // FIXME: Add animVal support. Animates baseVal at the moment.
-    // shouldBe("rect.x.animVal.value", "0");
-    // shouldBe("rect.x.baseVal.value", "200");
-
     // Check just before-end conditions
-    var ok = isCloseEnough(rect.x.animVal.value, 0, 0.01);
-    if (ok)
-        testPassed("rect.x.animVal.value is almost 0, just before-end");
-    else
-        testFailed("rect.x.animVal.value is NOT almost 0, as expected");
-
-    ok = isCloseEnough(rect.x.baseVal.value, 0, 0.01);
-    if (ok)
-        testPassed("rect.x.baseVal.value is almost 0, just before-end");
-    else
-        testFailed("rect.x.baseVal.value is NOT almost 0, as expected");
+    shouldBeCloseEnough("rect.x.animVal.value", "0.01", 0.01);
+    shouldBeCloseEnough("rect.x.baseVal.value", "0.01", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(150, 30)", 0);
+window.clickX = 150;
 var successfullyParsed = true;
index b10f9ad..f752189 100644 (file)
@@ -31,50 +31,28 @@ function sample1() {
 }
 
 function sample2() {
-    var ok = isCloseEnough(rect.x.animVal.value, 18.8, 0.01);
-    if (ok)
-        testPassed("rect.x.animVal.value is almost 18.8, after first half");
-    else
-        testFailed("rect.x.animVal.value is NOT almost 51, as expected");
-
-    ok = isCloseEnough(rect.x.baseVal.value, 18.8, 0.01);
-    if (ok)
-        testPassed("rect.x.baseVal.value is almost 18.8, after first half");
-    else
-        testFailed("rect.x.baseVal.value is NOT almost 18.8, as expected");
+    // Check half-time conditions
+    shouldBeCloseEnough("rect.x.animVal.value", "18.8", 0.01);
+    shouldBeCloseEnough("rect.x.baseVal.value", "18.8", 0.01);
 }
 
 function sample3() {
-    // FIXME: Add animVal support. Animates baseVal at the moment.
-    // shouldBe("rect.x.animVal.value", "0");
-    // shouldBe("rect.x.baseVal.value", "200");
-
     // Check just before-end conditions
-    var ok = isCloseEnough(rect.x.animVal.value, 0, 0.01);
-    if (ok)
-        testPassed("rect.x.animVal.value is almost 0, just before-end");
-    else
-        testFailed("rect.x.animVal.value is NOT almost 0, as expected");
-
-    ok = isCloseEnough(rect.x.baseVal.value, 0, 0.01);
-    if (ok)
-        testPassed("rect.x.baseVal.value is almost 0, just before-end");
-    else
-        testFailed("rect.x.baseVal.value is NOT almost 0, as expected");
+    shouldBeCloseEnough("rect.x.animVal.value", "0.01", 0.01);
+    shouldBeCloseEnough("rect.x.baseVal.value", "0.01", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(150, 30)", 0);
+window.clickX = 150;
 var successfullyParsed = true;
index d224958..10d0630 100644 (file)
@@ -30,50 +30,28 @@ function sample1() {
 }
 
 function sample2() {
-    var ok = isCloseEnough(rect.x.animVal.value, 18.8, 0.01);
-    if (ok)
-        testPassed("rect.x.animVal.value is almost 18.8, after first half");
-    else
-        testFailed("rect.x.animVal.value is NOT almost 51, as expected");
-
-    ok = isCloseEnough(rect.x.baseVal.value, 18.8, 0.01);
-    if (ok)
-        testPassed("rect.x.baseVal.value is almost 18.8, after first half");
-    else
-        testFailed("rect.x.baseVal.value is NOT almost 18.8, as expected");
+    // Check half-time conditions
+    shouldBeCloseEnough("rect.x.animVal.value", "18.8", 0.01);
+    shouldBeCloseEnough("rect.x.baseVal.value", "18.8", 0.01);
 }
 
 function sample3() {
-    // FIXME: Add animVal support. Animates baseVal at the moment.
-    // shouldBe("rect.x.animVal.value", "0");
-    // shouldBe("rect.x.baseVal.value", "200");
-
     // Check just before-end conditions
-    var ok = isCloseEnough(rect.x.animVal.value, 0, 0.01);
-    if (ok)
-        testPassed("rect.x.animVal.value is almost 0, just before-end");
-    else
-        testFailed("rect.x.animVal.value is NOT almost 0, as expected");
-
-    ok = isCloseEnough(rect.x.baseVal.value, 0, 0.01);
-    if (ok)
-        testPassed("rect.x.baseVal.value is almost 0, just before-end");
-    else
-        testFailed("rect.x.baseVal.value is NOT almost 0, as expected");
+    shouldBeCloseEnough("rect.x.animVal.value", "0.01", 0.01);
+    shouldBeCloseEnough("rect.x.baseVal.value", "0.01", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(150, 30)", 0);
+window.clickX = 150;
 var successfullyParsed = true;
index daf15f8..165dd86 100644 (file)
@@ -30,50 +30,28 @@ function sample1() {
 }
 
 function sample2() {
-    var ok = isCloseEnough(rect.x.animVal.value, 18.8, 0.01);
-    if (ok)
-        testPassed("rect.x.animVal.value is almost 18.8, after first half");
-    else
-        testFailed("rect.x.animVal.value is NOT almost 51, as expected");
-
-    ok = isCloseEnough(rect.x.baseVal.value, 18.8, 0.01);
-    if (ok)
-        testPassed("rect.x.baseVal.value is almost 18.8, after first half");
-    else
-        testFailed("rect.x.baseVal.value is NOT almost 18.8, as expected");
+    // Check half-time conditions
+    shouldBeCloseEnough("rect.x.animVal.value", "18.8", 0.01);
+    shouldBeCloseEnough("rect.x.baseVal.value", "18.8", 0.01);
 }
 
 function sample3() {
-    // FIXME: Add animVal support. Animates baseVal at the moment.
-    // shouldBe("rect.x.animVal.value", "0");
-    // shouldBe("rect.x.baseVal.value", "200");
-
     // Check just before-end conditions
-    var ok = isCloseEnough(rect.x.animVal.value, 0, 0.01);
-    if (ok)
-        testPassed("rect.x.animVal.value is almost 0, just before-end");
-    else
-        testFailed("rect.x.animVal.value is NOT almost 0, as expected");
-
-    ok = isCloseEnough(rect.x.baseVal.value, 0, 0.01);
-    if (ok)
-        testPassed("rect.x.baseVal.value is almost 0, just before-end");
-    else
-        testFailed("rect.x.baseVal.value is NOT almost 0, as expected");
+    shouldBeCloseEnough("rect.x.animVal.value", "0.01", 0.01);
+    shouldBeCloseEnough("rect.x.baseVal.value", "0.01", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(150, 30)", 0);
+window.clickX = 150;
 var successfullyParsed = true;
index 3c10013..bb8fa53 100644 (file)
@@ -23,7 +23,6 @@ rootSVGElement.appendChild(rect);
 
 // Setup animation test
 function sample1() {
-    // Check initial/end conditions
     shouldBeEqualToString("document.defaultView.getComputedStyle(rect).getPropertyValue('color')", "rgb(255, 0, 0)");
 }
 
@@ -33,18 +32,16 @@ function sample2() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample2],
-        ["animation", 0.001,  "rect", sample1],
-        ["animation", 1.0,    "rect", sample1],
-        ["animation", 3.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample2],
-        ["animation", 4.0 ,   "rect", sample2]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample2],
+        ["animation", 0.001, sample1],
+        ["animation", 1.0,   sample1],
+        ["animation", 3.0,   sample2],
+        ["animation", 3.999, sample2],
+        ["animation", 4.0,   sample2]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
index 7c8e23d..27d71bc 100644 (file)
@@ -8,6 +8,7 @@ rect.setAttribute("width", "100px");
 rect.setAttribute("height", "100px");
 rect.setAttribute("fill", "currentColor");
 rect.setAttribute("color", "red");
+rect.setAttribute("onclick", "executeTest()");
 
 var animateColor = createSVGElement("animateColor");
 animateColor.setAttribute("id", "animateColor");
@@ -58,17 +59,13 @@ function sample3() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animateColor", 0.0,    "rect", sample1],
-        ["animateColor", 1.5,    "rect", sample2],
-        ["animateColor", 3.0,    "rect", sample3]
+        // [animationId, time, sampleCallback]
+        ["animateColor", 0.0, sample1],
+        ["animateColor", 1.5, sample2],
+        ["animateColor", 3.0, sample3]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-rect.setAttribute("onclick", "executeTest()");
-window.setTimeout("triggerUpdate(50, 50)", 0);
-
 var successfullyParsed = true;
index 4fd4c20..8a80da1 100644 (file)
@@ -8,6 +8,7 @@ rect.setAttribute("width", "100px");
 rect.setAttribute("height", "100px");
 rect.setAttribute("fill", "currentColor");
 rect.setAttribute("color", "d00000");
+rect.setAttribute("onclick", "executeTest()");
 
 var animateColor = createSVGElement("animateColor");
 animateColor.setAttribute("id", "animateColor");
@@ -58,17 +59,13 @@ function sample3() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animateColor", 0.0,    "rect", sample1],
-        ["animateColor", 1.5,    "rect", sample2],
-        ["animateColor", 3.0,    "rect", sample3]
+        // [animationId, time, sampleCallback]
+        ["animateColor", 0.0, sample1],
+        ["animateColor", 1.5, sample2],
+        ["animateColor", 3.0, sample3]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-rect.setAttribute("onclick", "executeTest()");
-window.setTimeout("triggerUpdate(50, 50)", 0);
-
 var successfullyParsed = true;
index 97c9441..fe32fd4 100644 (file)
@@ -23,7 +23,6 @@ rootSVGElement.appendChild(rect);
 
 // Setup animation test
 function sample1() {
-    // Check initial/end conditions
     shouldBeEqualToString("document.defaultView.getComputedStyle(rect).getPropertyValue('color')", "rgba(255, 0, 0, 0.597656)");
 }
 
@@ -37,18 +36,16 @@ function sample3() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample3],
-        ["animation", 0.001,  "rect", sample1],
-        ["animation", 1.0,    "rect", sample1],
-        ["animation", 3.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample2],
-        ["animation", 4.0 ,   "rect", sample3]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,    sample3],
+        ["animation", 0.001,  sample1],
+        ["animation", 1.0,    sample1],
+        ["animation", 3.0,    sample2],
+        ["animation", 3.9999, sample2],
+        ["animation", 4.0 ,   sample3]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
index 4c432a5..2e7fb68 100644 (file)
@@ -7,6 +7,7 @@ rect.setAttribute("id", "test");
 rect.setAttribute("width", "100px");
 rect.setAttribute("height", "100px");
 rect.setAttribute("fill", "#00FF00");
+rect.setAttribute("onclick", "executeTest()");
 
 var animate = createSVGElement("animateColor");
 animate.setAttribute("id", "animation");
@@ -20,27 +21,22 @@ rootSVGElement.appendChild(rect);
 
 // Setup animation test
 function expectTransparent() {
-    // Check initial/end conditions
     shouldBe("rect.style.fill", "'#00ff00'");
 }
 
 function expectOtherColor() {
-    // Check half-time conditions
     shouldBe("rect.style.fill", "'#7f0000'");
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "test", expectTransparent],
-        ["animation", 1.5,    "test", expectOtherColor]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0, expectTransparent],
+        ["animation", 1.5, expectOtherColor]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-rect.setAttribute("onclick", "executeTest()");
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
 
index 84b85cf..ca8ab4b 100644 (file)
@@ -8,6 +8,7 @@ rect.setAttribute("width", "100px");
 rect.setAttribute("height", "100px");
 rect.setAttribute("fill", "red");
 rect.setAttribute("color", "green");
+rect.setAttribute("onclick", "executeTest()");
 
 var animateCurrentColor = createSVGElement("animateColor");
 animateCurrentColor.setAttribute("id", "animateCurrentColor");
@@ -38,17 +39,14 @@ function sample3() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animateCurrentColor", 0.0,    "rect", sample1],
-        ["animateCurrentColor", 1.5,    "rect", sample2],
-        ["animateCurrentColor", 3.0,    "rect", sample3]
+        // [animationId, time, sampleCallback]
+        ["animateCurrentColor", 0.0, sample1],
+        ["animateCurrentColor", 1.5, sample2],
+        ["animateCurrentColor", 3.0, sample3]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-rect.setAttribute("onclick", "executeTest()");
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
 
index 5bfe856..35c2d37 100644 (file)
@@ -38,15 +38,13 @@ function sample3() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.1,    "rect", sample1],
-        ["animation", 1.5,    "rect", sample2],
-        ["animation", 3.0,    "rect", sample3],
+        // [animationId, time, sampleCallback]
+        ["animation", 0.1, sample1],
+        ["animation", 1.5, sample2],
+        ["animation", 3.0, sample3],
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
index b9dd293..f7b0d23 100644 (file)
@@ -22,29 +22,31 @@ rootSVGElement.appendChild(rect);
 
 // Setup animation test
 function sample1() {
+    shouldBe("rect.x.animVal.value", "100");
     shouldBe("rect.x.baseVal.value", "100");
 }
 
 function sample2() {
+    shouldBe("rect.x.animVal.value", "50");
     shouldBe("rect.x.baseVal.value", "50");
 }
 
 function sample3() {
-    shouldBeCloseEnough("rect.x.baseVal.value", "200", 1);
+    shouldBeCloseEnough("rect.x.animVal.value", "200", 0.01);
+    shouldBeCloseEnough("rect.x.baseVal.value", "200", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 0.5,    "rect", sample2],
-        ["animation", 2.0,    "rect", sample3],
-        ["animation", 3.0,    "rect", sample3]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0, sample1],
+        ["animation", 0.5, sample2],
+        ["animation", 2.0, sample3],
+        ["animation", 3.0, sample3]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(150, 30)", 0);
+window.clickX = 150;
 var successfullyParsed = true;
index 4fad64e..759e298 100644 (file)
@@ -8,6 +8,7 @@ rect.setAttribute("id", "rect");
 rect.setAttribute("width", "50px");
 rect.setAttribute("height", "50px");
 rect.setAttribute("fill", "green");
+rect.setAttribute("onclick", "executeTest()");
 
 var animateX = createSVGElement("animate");
 animateX.setAttribute("id", "animateX");
@@ -27,33 +28,31 @@ function sample1() {
     shouldBe("rect.x.animVal.value", "50");
 }
 
-function startRestart() {
+function executeTest() {
+    // Start animating, and stop it again after 100ms.
     animateX.beginElement();
-    setTimeout(end,0);
+    setTimeout(end, 100);
 }
 
 function end() {
+    // Stop animating, and restart it in 100ms.
     animateX.endElement();
-    setTimeout(begin,0);
+    setTimeout(begin, 100);
 }
 
 function begin() {
-    animateX.beginElement();      
-    const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animateX", 1.0, "rect", sample1]
-    ];
-    runAnimationTest(expectedValues);
-}
+    // Once the animation is running again, sample it.
+    animateX.beginElement();
 
-function executeTest() {
-    //BeginElement-endElement-beginElement musn't execute in zero time, because in the current
-    //implemetation of the svg animation will loose the commands order!
-    startRestart();        
+    setTimeout(function() {
+        const expectedValues = [
+            // [animationId, time, sampleCallback]
+            ["animateX", 1.0, sample1]
+        ];
+        runAnimationTest(expectedValues);
+    }, 100);
 }
 
-// Begin test async
-rect.setAttribute("onclick", "executeTest()");
-window.setTimeout("triggerUpdate(50, 50)", 0);
+window.clickX = 40;
+window.clickY = 40;
 var successfullyParsed = true;
-
index 5883314..c51b126 100644 (file)
@@ -31,15 +31,14 @@ function sample2() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.5,    "rect", sample1],
-        ["animation", 1.5,    "rect", sample2],
-        ["animation", 2.5,    "rect", sample2]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.5, sample1],
+        ["animation", 1.5, sample2],
+        ["animation", 2.5, sample2]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(150, 30)", 0);
+window.clickX = 150;
 var successfullyParsed = true;
index 08f68b9..853498f 100644 (file)
@@ -1,4 +1,3 @@
-// FIXME: This test will become useful once we have basic animVal support. For now it's just testing the SVG animation test infrastructure
 description("Tests if gradientTransform of a gradient is animateable.");
 createSVGTestCase();
 
@@ -24,11 +23,12 @@ animate.setAttribute("attributeName", "gradientTransform");
 animate.setAttribute("type", "translate");
 animate.setAttribute("from", "0");
 animate.setAttribute("to", "200");
-animate.setAttribute("begin", "click");
+animate.setAttribute("begin", "rect.click");
 animate.setAttribute("dur", "4s");
 animate.setAttribute("fill", "freeze");
 
 var rect = createSVGElement("rect");
+rect.setAttribute("id", "rect");
 rect.setAttribute("fill", "url(#gradient)");
 rect.setAttribute("width", "200");
 rect.setAttribute("height", "200");
@@ -43,21 +43,18 @@ rootSVGElement.appendChild(rect);
 
 // Setup animation test
 function sample1() {
-    // FIXME: Add animVal support. Animates baseVal at the moment.
     // Check initial conditions
     shouldBe("gradient.gradientTransform.baseVal.consolidate().matrix.e", "0");
     shouldThrow("gradient.gradientTransform.animVal.consolidate().matrix.e");
 }
 
 function sample2() {
-    // FIXME: Add animVal support. Animates baseVal at the moment.
     // Check half-time conditions
     shouldBe("gradient.gradientTransform.baseVal.consolidate().matrix.e", "100");
     shouldThrow("gradient.gradientTransform.animVal.consolidate().matrix.e");
 }
 
 function sample3() {
-    // FIXME: Add animVal support. Animates baseVal at the moment.
     // Check end conditions
     shouldBe("gradient.gradientTransform.baseVal.consolidate().matrix.e", "200");
     shouldThrow("gradient.gradientTransform.animVal.consolidate().matrix.e");
@@ -65,17 +62,13 @@ function sample3() {
 
 function executeTest() {  
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "gradient", sample1],
-        ["animation", 2.0,    "gradient", sample2],
-        ["animation", 4.0,    "gradient", sample3],
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0, sample1],
+        ["animation", 2.0, sample2],
+        ["animation", 4.0, sample3]
     ];
 
-    animate.beginElement();
     runAnimationTest(expectedValues);
-  
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(15, 30)", 0);
 var successfullyParsed = true;
index ad1b1cd..fa645d8 100644 (file)
@@ -10,6 +10,7 @@ rect.setAttribute("id", "rect");
 rect.setAttribute("width", "100px");
 rect.setAttribute("height", "100px");
 rect.setAttribute("fill", "red");
+rect.setAttribute("onclick", "executeTest()");
 g.appendChild(rect);
 
 var animateInherit = createSVGElement("animateColor");
@@ -41,17 +42,13 @@ function sample3() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animateInherit", 0.0,    "rect", sample1],
-        ["animateInherit", 1.5,    "rect", sample2],
-        ["animateInherit", 3.0,    "rect", sample3]
+        // [animationId, time, sampleCallback]
+        ["animateInherit", 0.0, sample1],
+        ["animateInherit", 1.5, sample2],
+        ["animateInherit", 3.0, sample3]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-rect.setAttribute("onclick", "executeTest()");
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
-
index ea23c63..954c13f 100644 (file)
@@ -1,7 +1,6 @@
 description("Test behavior of dynamically inserting animate with begin attribute");
 createSVGTestCase();
 
-
 // Setup test document
 var rect = createSVGElement("rect");
 rect.setAttribute("id", "rect");
@@ -10,7 +9,6 @@ rect.setAttribute("y", "45");
 rect.setAttribute("width", "10");
 rect.setAttribute("height", "10");
 rect.setAttribute("fill", "green");
-rect.setAttribute("onclick", "executeTest()");
 
 var animate = createSVGElement("animate");
 animate.setAttribute("id", "animation");
@@ -34,14 +32,13 @@ function sample2() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 3.0,    "rect", sample2],
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0, sample1],
+        ["animation", 3.0, sample2],
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(5, 50)", 0);
+window.animationStartsImmediately = true;
 var successfullyParsed = true;
index 30393b4..c70756a 100644 (file)
@@ -7,10 +7,9 @@ var rect = createSVGElement("rect");
 rect.setAttribute("id", "rect");
 rect.setAttribute("x", "0");
 rect.setAttribute("y", "45");
-rect.setAttribute("width", "10");
-rect.setAttribute("height", "10");
+rect.setAttribute("width", "100");
+rect.setAttribute("height", "100");
 rect.setAttribute("fill", "green");
-rect.setAttribute("onclick", "executeTest()");
 
 var animate = createSVGElement("animate");
 animate.setAttribute("id", "animation");
@@ -33,14 +32,13 @@ function sample2() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 3.0,    "rect", sample2],
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0, sample1],
+        ["animation", 3.0, sample2],
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(5, 50)", 0);
+window.animationStartsImmediately = true;
 var successfullyParsed = true;
index 03c8db1..7af22a2 100644 (file)
@@ -1,4 +1,3 @@
-// FIXME: This test will become useful once we have basic animVal support. For now it's just testing the SVG animation test infrastructure
 description("Testing correct parsing of keySplines.");
 createSVGTestCase();
 
@@ -25,21 +24,18 @@ rootSVGElement.appendChild(rect);
 
 // Setup animation test
 function sample1() {
-    // FIXME: Add animVal support. Animates baseVal at the moment.
     // Check initial/end conditions
     shouldBe("rect.height.baseVal.value", "167");
     shouldBe("rect.height.animVal.value", "167");
 }
 
 function sample2() {
-    // FIXME: Add animVal support. Animates baseVal at the moment.
     // Check half-time conditions
     shouldBe("rect.height.baseVal.value", "111");
     shouldBe("rect.height.animVal.value", "111");
 }
 
 function sample3() {
-    // FIXME: Add animVal support. Animates baseVal at the moment.
     // Check just before-end conditions
     shouldBe("rect.height.baseVal.value", "100");
     shouldBe("rect.height.animVal.value", "100");
@@ -47,15 +43,13 @@ function sample3() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 3.0,    "rect", sample1],
-        ["animation", 6.0,    "rect", sample2],
-        ["animation", 9.0,    "rect", sample3]
+        // [animationId, time, sampleCallback]
+        ["animation", 3.0, sample1],
+        ["animation", 6.0, sample2],
+        ["animation", 9.0, sample3]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(15, 30)", 0);
 var successfullyParsed = true;
index 1ff89b4..82b8175 100644 (file)
@@ -46,13 +46,13 @@ function endSample() {
 
 function executeTest() {
     const expectedValues = [
-        ["animation", 0.01, "g", startSample],
-        ["animation", 3.99, "g", endSample]
+        ["animation", 0.01, startSample],
+        ["animation", 3.99, endSample]
     ];
     
     runAnimationTest(expectedValues);
 }
 
-window.setTimeout("triggerUpdate(10, 40)", 0);
+window.clickX = 30;
+window.clickY = 30;
 var successfullyParsed = true;
-
index c7cbcf8..9aafa8f 100644 (file)
@@ -36,15 +36,14 @@ function sample3() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 1.0,    "rect", sample1],
-        ["animation", 1.5,    "rect", sample2],
-        ["animation", 3.0,    "rect", sample3]
+        // [animationId, time, sampleCallback]
+        ["animation", 1.0, sample1],
+        ["animation", 1.5, sample2],
+        ["animation", 3.0, sample3]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(150, 30)", 0);
+window.clickX = 150;
 var successfullyParsed = true;
index 7661215..4489dd6 100644 (file)
@@ -23,28 +23,26 @@ rootSVGElement.appendChild(rect);
 
 // Setup animation test
 function sample1() {
-    // FIXME: Add animVal support. Animates baseVal at the moment.
     // Check initial/end conditions
-    shouldBe("rect.x.baseVal.value", "100");
+    shouldBe("rect.x.animVal.value", "100");
 }
 
 function sample2() {
-    shouldBe("rect.x.baseVal.value", "0");
+    shouldBe("rect.x.animVal.value", "0");
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 1.0,    "rect", sample1],
-        ["animation", 3.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample2],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 1.0,   sample1],
+        ["animation", 3.0,   sample2],
+        ["animation", 3.999, sample2],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(150, 30)", 0);
+window.clickX = 150;
 var successfullyParsed = true;
index fa10ff2..85c4b5f 100644 (file)
@@ -83,30 +83,28 @@ function sample4() {
     shouldBe("path.pathSegList.getItem(1).pathSegTypeAsLetter", "'c'");
     shouldBeCloseEnough("path.pathSegList.getItem(1).x", "40", 0.01);
     shouldBeCloseEnough("path.pathSegList.getItem(1).y", "40", 0.01);
-    shouldBeCloseEnough("path.pathSegList.getItem(1).x1", "0", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(1).x1", "0.01", 0.01);
     shouldBeCloseEnough("path.pathSegList.getItem(1).y1", "40", 0.01);
-    shouldBeCloseEnough("path.pathSegList.getItem(1).x2", "0", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(1).x2", "0.01", 0.01);
     shouldBeCloseEnough("path.pathSegList.getItem(1).y2", "40", 0.01);
     shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'s'");
-    shouldBeCloseEnough("path.pathSegList.getItem(2).x", "0", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(2).x", "-0.01", 0.01);
     shouldBeCloseEnough("path.pathSegList.getItem(2).y", "-40", 0.01);
     shouldBeCloseEnough("path.pathSegList.getItem(2).x2", "40", 0.01);
-    shouldBeCloseEnough("path.pathSegList.getItem(2).y2", "0", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(2).y2", "0.01", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "path", sample1],
-        ["animation", 1.0,    "path", sample2],
-        ["animation", 3.0,    "path", sample3],
-        ["animation", 3.9999, "path", sample4],
-        ["animation", 4.0 ,   "path", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 1.0,   sample2],
+        ["animation", 3.0,   sample3],
+        ["animation", 3.999, sample4],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
index 44b1de2..9ff2ec6 100644 (file)
@@ -63,30 +63,28 @@ function sample3() {
 
 function sample4() {
     shouldBe("path.pathSegList.getItem(0).pathSegTypeAsLetter", "'M'");
-    shouldBeCloseEnough("path.pathSegList.getItem(0).x", "30", 0.01);
-    shouldBeCloseEnough("path.pathSegList.getItem(0).y", "30", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(0).x", "29.98", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(0).y", "29.98", 0.01);
     shouldBe("path.pathSegList.getItem(1).pathSegTypeAsLetter", "'l'");
-    shouldBeCloseEnough("path.pathSegList.getItem(1).x", "-60", 0.01);
-    shouldBeCloseEnough("path.pathSegList.getItem(1).y", "-30", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(1).x", "-59.98", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(1).y", "-29.98", 0.01);
     shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'v'");
-    shouldBeCloseEnough("path.pathSegList.getItem(2).y", "-30", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(2).y", "-29.98", 0.01);
     shouldBe("path.pathSegList.getItem(3).pathSegTypeAsLetter", "'h'");
-    shouldBeCloseEnough("path.pathSegList.getItem(3).x", "30", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(3).x", "29.98", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "path", sample1],
-        ["animation", 1.0,    "path", sample2],
-        ["animation", 3.0,    "path", sample3],
-        ["animation", 3.9999, "path", sample4],
-        ["animation", 4.0 ,   "path", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 1.0,   sample2],
+        ["animation", 3.0,   sample3],
+        ["animation", 3.999, sample4],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
index c5f7e84..6eb50e1 100644 (file)
@@ -80,17 +80,15 @@ function sample4() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "path", sample1],
-        ["animation", 1.0,    "path", sample2],
-        ["animation", 3.0,    "path", sample3],
-        ["animation", 3.9999, "path", sample4],
-        ["animation", 4.0 ,   "path", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 1.0,   sample2],
+        ["animation", 3.0,   sample3],
+        ["animation", 3.999, sample4],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
index 8cdf37f..fb3da50 100644 (file)
@@ -83,30 +83,28 @@ function sample4() {
     shouldBe("path.pathSegList.getItem(1).pathSegTypeAsLetter", "'C'");
     shouldBeCloseEnough("path.pathSegList.getItem(1).x", "20", 0.01);
     shouldBeCloseEnough("path.pathSegList.getItem(1).y", "20", 0.01);
-    shouldBeCloseEnough("path.pathSegList.getItem(1).x1", "20", 0.01);
-    shouldBeCloseEnough("path.pathSegList.getItem(1).y1", "-20", 0.01);
-    shouldBeCloseEnough("path.pathSegList.getItem(1).x2", "20", 0.01);
-    shouldBeCloseEnough("path.pathSegList.getItem(1).y2", "-20", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(1).x1", "19.98", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(1).y1", "-19.98", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(1).x2", "19.98", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(1).y2", "-19.98", 0.01);
     shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'S'");
-    shouldBeCloseEnough("path.pathSegList.getItem(2).x", "-20", 0.01);
-    shouldBeCloseEnough("path.pathSegList.getItem(2).y", "20", 0.01);
-    shouldBeCloseEnough("path.pathSegList.getItem(2).x2", "20", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(2).x", "-19.98", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(2).y", "19.98", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(2).x2", "20.01", 0.01);
     shouldBeCloseEnough("path.pathSegList.getItem(2).y2", "40", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "path", sample1],
-        ["animation", 1.0,    "path", sample2],
-        ["animation", 3.0,    "path", sample3],
-        ["animation", 3.9999, "path", sample4],
-        ["animation", 4.0 ,   "path", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 1.0,   sample2],
+        ["animation", 3.0,   sample3],
+        ["animation", 3.999, sample4],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
index f5ca8ca..1a25af9 100644 (file)
@@ -63,30 +63,28 @@ function sample3() {
 
 function sample4() {
     shouldBe("path.pathSegList.getItem(0).pathSegTypeAsLetter", "'M'");
-    shouldBeCloseEnough("path.pathSegList.getItem(0).x", "-30", 0.01);
-    shouldBeCloseEnough("path.pathSegList.getItem(0).y", "-30", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(0).x", "-29.98", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(0).y", "-29.98", 0.01);
     shouldBe("path.pathSegList.getItem(1).pathSegTypeAsLetter", "'L'");
-    shouldBeCloseEnough("path.pathSegList.getItem(1).x", "30", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(1).x", "29.98", 0.01);
     shouldBeCloseEnough("path.pathSegList.getItem(1).y", "0", 0.01);
     shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'V'");
-    shouldBeCloseEnough("path.pathSegList.getItem(2).y", "30", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(2).y", "29.98", 0.01);
     shouldBe("path.pathSegList.getItem(3).pathSegTypeAsLetter", "'H'");
     shouldBeCloseEnough("path.pathSegList.getItem(3).x", "0", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "path", sample1],
-        ["animation", 1.0,    "path", sample2],
-        ["animation", 3.0,    "path", sample3],
-        ["animation", 3.9999, "path", sample4],
-        ["animation", 4.0 ,   "path", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 1.0,   sample2],
+        ["animation", 3.0,   sample3],
+        ["animation", 3.999, sample4],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
index 9849a77..bbdc793 100644 (file)
@@ -80,17 +80,15 @@ function sample4() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "path", sample1],
-        ["animation", 1.0,    "path", sample2],
-        ["animation", 3.0,    "path", sample3],
-        ["animation", 3.9999, "path", sample4],
-        ["animation", 4.0 ,   "path", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 1.0,   sample2],
+        ["animation", 3.0,   sample3],
+        ["animation", 3.999, sample4],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
index fa8d248..0d1f927 100644 (file)
@@ -25,34 +25,25 @@ animateMotion.setAttribute("begin", "click")
 g.appendChild(animateMotion)
 rootSVGElement.appendChild(g)
 
-function passIfCloseEnough(name, value, error) {
-    passed = isCloseEnough(eval(name), value, error);
-    if (passed) {
-        testPassed(name + " is almost " + value + " (within " + error + ")");
-    } else {
-        testFailed(name + " is " + eval(name) + " but should be within " + error + " of " + value);  
-    }
-}
-
 function startSample() {
-    passIfCloseEnough("rootSVGElement.getBBox().x", 132, 20);
-    passIfCloseEnough("rootSVGElement.getBBox().y", -90, 20);
+    shouldBeCloseEnough("rootSVGElement.getBBox().x", "132", 5);
+    shouldBeCloseEnough("rootSVGElement.getBBox().y", "-90", 5);
 }
 
 function endSample() {
-    passIfCloseEnough("rootSVGElement.getBBox().x", 332, 20);
-    passIfCloseEnough("rootSVGElement.getBBox().y", 550, 20);
+    shouldBeCloseEnough("rootSVGElement.getBBox().x", "332", 5);
+    shouldBeCloseEnough("rootSVGElement.getBBox().y", "550", 5);
 }
 
 function executeTest() {
     const expectedValues = [
-        ["animation", 0.01, "g", startSample],
-        ["animation", 3.99, "g", endSample]
+        ["animation", 0.01, startSample],
+        ["animation", 3.99, endSample]
     ];
     
     runAnimationTest(expectedValues);
 }
 
-window.setTimeout("triggerUpdate(310, 40)", 0);
+window.clickX = 310;
+window.clickY = 30;
 var successfullyParsed = true;
-
index ec2a376..ec7df26 100644 (file)
@@ -26,45 +26,25 @@ function sample1() {
 }
 
 function sample2() {
-    var ok = isCloseEnough(path.pathSegList.getItem(0).x, 20, 0.01);
-    if (ok)
-        testPassed("path.pathSegList.getItem(0).x is almost 20, after first half");
-    else
-        testFailed("path.pathSegList.getItem(0).x was NOT almost 20, as expected");
-
-    ok = isCloseEnough(path.pathSegList.getItem(0).y, 20, 0.01);
-    if (ok)
-        testPassed("path.pathSegList.getItem(0).y is almost 20, after first half");
-    else
-        testFailed("path.pathSegList.getItem(0).y was NOT almost 20, as expected");
+    shouldBeCloseEnough("path.pathSegList.getItem(0).x", "20", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(0).y", "20", 0.01);
 }
 
 function sample3() {
-    var ok = isCloseEnough(path.pathSegList.getItem(0).x, 0, 0.01);
-    if (ok)
-        testPassed("path.pathSegList.getItem(0).x is almost 0, after first half");
-    else
-        testFailed("path.pathSegList.getItem(0).x was NOT almost 0, as expected");
-
-    ok = isCloseEnough(path.pathSegList.getItem(0).y, 0, 0.01);
-    if (ok)
-        testPassed("path.pathSegList.getItem(0).y is almost 0, after first half");
-    else
-        testFailed("path.pathSegList.getItem(0).y was NOT almost 0, as expected");
+    shouldBeCloseEnough("path.pathSegList.getItem(0).x", "0.01", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(0).y", "0.01", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "path", sample1],
-        ["animation", 2.0,    "path", sample2],
-        ["animation", 3.9999, "path", sample3],
-        ["animation", 4.0 ,   "path", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
index 744c8d7..68aa7f0 100644 (file)
@@ -10,7 +10,7 @@ text.setAttribute("onclick", "executeTest()")
 
 var animateMotion = createSVGElement("animateMotion")
 animateMotion.setAttribute("id", "animation")
-animateMotion.setAttribute("dur", "1s")
+animateMotion.setAttribute("dur", "4s")
 animateMotion.setAttribute("repeatCount", "1")
 animateMotion.setAttribute("rotate", "auto")
 animateMotion.setAttribute("path", "M 100,250 C 100,50 400,50 400,250")
@@ -18,34 +18,25 @@ animateMotion.setAttribute("begin", "click")
 text.appendChild(animateMotion)
 rootSVGElement.appendChild(text)
 
-function passIfCloseEnough(name, value, error) {
-    passed = isCloseEnough(eval(name), value, error);
-    if (passed) {
-        testPassed(name + " is almost " + value + " (within " + error + ")");
-    } else {
-        testFailed(name + " is " + eval(name) + " but should be within " + error + " of " + value);  
-    }
-}
-
 function startSample() {
-    passIfCloseEnough("rootSVGElement.getBBox().x", 196, 20);
-    passIfCloseEnough("rootSVGElement.getBBox().y", -186, 20);
+    shouldBeCloseEnough("rootSVGElement.getBBox().x", "118.65", 0.01);
+    shouldBeCloseEnough("rootSVGElement.getBBox().y", "-161.03", 0.01);
 }
 
 function endSample() {
-    passIfCloseEnough("rootSVGElement.getBBox().x", 370, 20);
-    passIfCloseEnough("rootSVGElement.getBBox().y", 547, 20);
+    shouldBeCloseEnough("rootSVGElement.getBBox().x", "366.89", 1);
+    shouldBeCloseEnough("rootSVGElement.getBBox().y", "549.93", 1);
 }
 
 function executeTest() {
     const expectedValues = [
-        ["animation", 0.1, "text", startSample],
-        ["animation", 1.0, "text", endSample]
+        ["animation", 0.01, startSample],
+        ["animation", 3.999, endSample]
     ];
     
     runAnimationTest(expectedValues);
 }
 
-window.setTimeout("triggerUpdate(310, 30)", 0);
+window.clickX = 310;
+window.clickY = 30;
 var successfullyParsed = true;
-
index e9b0e1c..d331249 100644 (file)
@@ -58,16 +58,14 @@ function sample3() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0,      "pattern", sample1],
-        ["animation", 2.0,    "pattern", sample2],
-        ["animation", 3.9999, "pattern", sample3],
-        ["animation", 4, "pattern", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(15, 30)", 0);
 var successfullyParsed = true;
index 82bec00..32d3729 100644 (file)
@@ -24,32 +24,30 @@ rootSVGElement.appendChild(animate);
 
 // Setup animation test
 function sample1() {
-       shouldBe("rootSVGElement.preserveAspectRatio.animVal.align", "SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMIN");
-       shouldBe("rootSVGElement.preserveAspectRatio.animVal.meetOrSlice", "SVGPreserveAspectRatio.SVG_MEETORSLICE_MEET");
+    shouldBe("rootSVGElement.preserveAspectRatio.animVal.align", "SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMIN");
+    shouldBe("rootSVGElement.preserveAspectRatio.animVal.meetOrSlice", "SVGPreserveAspectRatio.SVG_MEETORSLICE_MEET");
 }
 
 function sample2() {
-       shouldBe("rootSVGElement.preserveAspectRatio.animVal.align", "SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMINYMIN");
-       shouldBe("rootSVGElement.preserveAspectRatio.animVal.meetOrSlice", "SVGPreserveAspectRatio.SVG_MEETORSLICE_MEET");
+    shouldBe("rootSVGElement.preserveAspectRatio.animVal.align", "SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMINYMIN");
+    shouldBe("rootSVGElement.preserveAspectRatio.animVal.meetOrSlice", "SVGPreserveAspectRatio.SVG_MEETORSLICE_MEET");
 }
 
 function sample3() {
-       shouldBe("rootSVGElement.preserveAspectRatio.animVal.align", "SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMID");
-       shouldBe("rootSVGElement.preserveAspectRatio.animVal.meetOrSlice", "SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE");
+    shouldBe("rootSVGElement.preserveAspectRatio.animVal.align", "SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMID");
+    shouldBe("rootSVGElement.preserveAspectRatio.animVal.meetOrSlice", "SVGPreserveAspectRatio.SVG_MEETORSLICE_SLICE");
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "root", sample1],
-        ["animation", 2.0,    "root", sample2],
-        ["animation", 3.9999, "root", sample3],
-        ["animation", 4.0 ,   "root", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
index f2c9724..2d4bb6a 100644 (file)
@@ -48,27 +48,25 @@ function sample1() {
 }
 
 function sample2() {
-    shouldBeCloseEnough("marker.orientAngle.animVal.value", "90", 0.1);
-    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90", 0.1);
+    shouldBeCloseEnough("marker.orientAngle.animVal.value", "90", 0.01);
+    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90", 0.01);
 }
 
 function sample3() {
-    shouldBeCloseEnough("marker.orientAngle.animVal.value", "180", 0.1);
-    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "180", 0.1);
+    shouldBeCloseEnough("marker.orientAngle.animVal.value", "179.96", 0.01);
+    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "179.96", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "marker", sample1],
-        ["animation", 2.0,    "marker", sample2],
-        ["animation", 3.9999, "marker", sample3],
-        ["animation", 4.0 ,   "marker", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
index 3dd2acb..339de99 100644 (file)
@@ -48,27 +48,25 @@ function sample1() {
 }
 
 function sample2() {
-    shouldBeCloseEnough("marker.orientAngle.animVal.value", "90", 0.1);
-    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90", 0.1);
+    shouldBeCloseEnough("marker.orientAngle.animVal.value", "90", 0.01);
+    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90", 0.01);
 }
 
 function sample3() {
-    shouldBeCloseEnough("marker.orientAngle.animVal.value", "180", 0.1);
-    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "180", 0.1);
+    shouldBeCloseEnough("marker.orientAngle.animVal.value", "179.96", 0.01);
+    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "179.96", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "marker", sample1],
-        ["animation", 2.0,    "marker", sample2],
-        ["animation", 3.9999, "marker", sample3],
-        ["animation", 4.0 ,   "marker", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
index 82fc8c3..e4e5803 100644 (file)
@@ -48,27 +48,25 @@ function sample1() {
 }
 
 function sample2() {
-    shouldBeCloseEnough("marker.orientAngle.animVal.value", "90", 0.1);
-    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90", 0.1);
+    shouldBeCloseEnough("marker.orientAngle.animVal.value", "90", 0.01);
+    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90", 0.01);
 }
 
 function sample3() {
-    shouldBeCloseEnough("marker.orientAngle.animVal.value", "180", 0.1);
-    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "180", 0.1);
+    shouldBeCloseEnough("marker.orientAngle.animVal.value", "179.96", 0.01);
+    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "179.96", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "marker", sample1],
-        ["animation", 2.0,    "marker", sample2],
-        ["animation", 3.9999, "marker", sample3],
-        ["animation", 4.0 ,   "marker", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
index 1c5206d..1a8a6da 100644 (file)
@@ -48,27 +48,25 @@ function sample1() {
 }
 
 function sample2() {
-    shouldBeCloseEnough("marker.orientAngle.animVal.value", "90", 0.1);
-    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90", 0.1);
+    shouldBeCloseEnough("marker.orientAngle.animVal.value", "90", 0.01);
+    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90", 0.01);
 }
 
 function sample3() {
-    shouldBeCloseEnough("marker.orientAngle.animVal.value", "180", 0.1);
-    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "180", 0.1);
+    shouldBeCloseEnough("marker.orientAngle.animVal.value", "179.96", 0.01);
+    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "179.96", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "marker", sample1],
-        ["animation", 2.0,    "marker", sample2],
-        ["animation", 3.9999, "marker", sample3],
-        ["animation", 4.0 ,   "marker", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
index 4555809..36b8059 100644 (file)
@@ -48,27 +48,25 @@ function sample1() {
 }
 
 function sample2() {
-    shouldBeCloseEnough("marker.orientAngle.animVal.value", "90", 0.1);
-    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90", 0.1);
+    shouldBeCloseEnough("marker.orientAngle.animVal.value", "90", 0.01);
+    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90", 0.01);
 }
 
 function sample3() {
-    shouldBeCloseEnough("marker.orientAngle.animVal.value", "180", 0.1);
-    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "180", 0.1);
+    shouldBeCloseEnough("marker.orientAngle.animVal.value", "179.96", 0.01);
+    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "179.96", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "marker", sample1],
-        ["animation", 2.0,    "marker", sample2],
-        ["animation", 3.9999, "marker", sample3],
-        ["animation", 4.0 ,   "marker", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
index db78896..fc0fb9b 100644 (file)
@@ -48,27 +48,25 @@ function sample1() {
 }
 
 function sample2() {
-    shouldBeCloseEnough("marker.orientAngle.animVal.value", "90", 0.1);
-    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90", 0.1);
+    shouldBeCloseEnough("marker.orientAngle.animVal.value", "90", 0.01);
+    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90", 0.01);
 }
 
 function sample3() {
-    shouldBeCloseEnough("marker.orientAngle.animVal.value", "180", 0.1);
-    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "180", 0.1);
+    shouldBeCloseEnough("marker.orientAngle.animVal.value", "179.96", 0.01);
+    shouldBeCloseEnough("marker.orientAngle.baseVal.value", "179.96", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "marker", sample1],
-        ["animation", 2.0,    "marker", sample2],
-        ["animation", 3.9999, "marker", sample3],
-        ["animation", 4.0 ,   "marker", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
index 65896fa..f0f054e 100644 (file)
@@ -35,29 +35,27 @@ feConvolveMatrix.appendChild(animate);
 
 // Setup animation test
 function sample1() {
-       shouldBe("feConvolveMatrix.preserveAlpha.animVal", "false");
+    shouldBe("feConvolveMatrix.preserveAlpha.animVal", "false");
 }
 
 function sample2() {
-       shouldBe("feConvolveMatrix.preserveAlpha.animVal", "false");
+    shouldBe("feConvolveMatrix.preserveAlpha.animVal", "false");
 }
 
 function sample3() {
-       shouldBe("feConvolveMatrix.preserveAlpha.animVal", "true");
+    shouldBe("feConvolveMatrix.preserveAlpha.animVal", "true");
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "effect", sample1],
-        ["animation", 2.0,    "effect", sample2],
-        ["animation", 3.9999, "effect", sample3],
-        ["animation", 4.0 ,   "effect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
index d721141..af00a02 100644 (file)
@@ -36,32 +36,30 @@ feConvlveMatrix.appendChild(animate);
 
 // Setup animation test
 function sample1() {
-       shouldBe("feConvolveMatrix.targetX.animVal", "0");
-       // shouldBe("feConvolveMatrix.targetX.baseVal", "0");
+    shouldBe("feConvolveMatrix.targetX.animVal", "0");
+    // shouldBe("feConvolveMatrix.targetX.baseVal", "0");
 }
 
 function sample2() {
-       shouldBe("feConvolveMatrix.targetX.animVal", "1");
-       // shouldBe("feConvolveMatrix.targetX.baseVal", "0");
+    shouldBe("feConvolveMatrix.targetX.animVal", "1");
+    // shouldBe("feConvolveMatrix.targetX.baseVal", "0");
 }
 
 function sample3() {
-       shouldBe("feConvolveMatrix.targetX.animVal", "2");
-       // shouldBe("feConvolveMatrix.targetX.baseVal", "0");
+    shouldBe("feConvolveMatrix.targetX.animVal", "2");
+    // shouldBe("feConvolveMatrix.targetX.baseVal", "0");
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "feConvolveMatrix", sample1],
-        ["animation", 2.0,    "feConvolveMatrix", sample2],
-        ["animation", 3.9999, "feConvolveMatrix", sample3],
-        ["animation", 4.1 ,   "feConvolveMatrix", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(51, 49)", 0);
 var successfullyParsed = true;
index f162beb..f2aec29 100644 (file)
@@ -38,22 +38,20 @@ function sample2() {
 }
 
 function sample3() {
-    shouldBeCloseEnough("rect.height.animVal.value", "200", 0.01);
-    shouldBeCloseEnough("rect.height.baseVal.value", "200", 0.01);
+    shouldBeCloseEnough("rect.height.animVal.value", "199.98", 0.01);
+    shouldBeCloseEnough("rect.height.baseVal.value", "199.98", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
-var successfullyParsed = true;
\ No newline at end of file
+var successfullyParsed = true;
index 74f9fee..fdeae85 100644 (file)
@@ -37,22 +37,20 @@ function sample2() {
 }
 
 function sample3() {
-    shouldBeCloseEnough("circle.r.animVal.value", "254.9", 0.1);
-    shouldBeCloseEnough("circle.r.baseVal.value", "254.9", 0.1);
+    shouldBeCloseEnough("circle.r.animVal.value", "254.89", 0.01);
+    shouldBeCloseEnough("circle.r.baseVal.value", "254.89", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "circle", sample1],
-        ["animation", 2.0,    "circle", sample2],
-        ["animation", 3.9999, "circle", sample3],
-        ["animation", 4.0 ,   "circle", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
-var successfullyParsed = true;
\ No newline at end of file
+var successfullyParsed = true;
index 0b01503..e945093 100644 (file)
@@ -38,22 +38,20 @@ function sample2() {
 }
 
 function sample3() {
-    shouldBeCloseEnough("rect.width.animVal.value", "300", 0.01);
-    shouldBeCloseEnough("rect.width.baseVal.value", "300", 0.01);
+    shouldBeCloseEnough("rect.width.animVal.value", "299.96", 0.01);
+    shouldBeCloseEnough("rect.width.baseVal.value", "299.96", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
-var successfullyParsed = true;
\ No newline at end of file
+var successfullyParsed = true;
index 5daa2cf..1a64a34 100644 (file)
@@ -34,15 +34,13 @@ function sample2() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0, sample1],
+        ["animation", 2.0, sample2],
+        ["animation", 4.0, sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
 var successfullyParsed = true;
index 1e41451..37feb53 100644 (file)
@@ -34,15 +34,13 @@ function sample2() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0, sample1],
+        ["animation", 2.0, sample2],
+        ["animation", 4.0, sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
 var successfullyParsed = true;
index ee69b89..4fcb251 100644 (file)
@@ -34,15 +34,13 @@ function sample2() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0, sample1],
+        ["animation", 2.0, sample2],
+        ["animation", 4.0, sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
 var successfullyParsed = true;
index 8b2afa4..b8c10ed 100644 (file)
@@ -33,22 +33,20 @@ function sample2() {
 }
 
 function sample3() {
-    shouldBeCloseEnough("rect.width.animVal.value", "200", 0.01);
-    shouldBeCloseEnough("rect.width.baseVal.value", "200", 0.01);
+    shouldBeCloseEnough("rect.width.animVal.value", "199.98", 0.01);
+    shouldBeCloseEnough("rect.width.baseVal.value", "199.98", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
 var successfullyParsed = true;
index 687a110..62e2266 100644 (file)
@@ -33,22 +33,20 @@ function sample2() {
 }
 
 function sample3() {
-    shouldBeCloseEnough("rect.width.animVal.value", "188.98", 0.01);
-    shouldBeCloseEnough("rect.width.baseVal.value", "188.98", 0.01);
+    shouldBeCloseEnough("rect.width.animVal.value", "188.96", 0.01);
+    shouldBeCloseEnough("rect.width.baseVal.value", "188.96", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
 var successfullyParsed = true;
index 5f9099c..8f91168 100644 (file)
@@ -34,22 +34,20 @@ function sample2() {
 }
 
 function sample3() {
-    shouldBeCloseEnough("rect.width.animVal.value", "200", 0.01);
-    shouldBeCloseEnough("rect.width.baseVal.value", "200", 0.01);
+    shouldBeCloseEnough("rect.width.animVal.value", "199.98", 0.01);
+    shouldBeCloseEnough("rect.width.baseVal.value", "199.98", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
 var successfullyParsed = true;
index 0c0f866..62467d0 100644 (file)
@@ -34,22 +34,20 @@ function sample2() {
 }
 
 function sample3() {
-    shouldBeCloseEnough("rect.width.animVal.value", "200", 0.01);
-    shouldBeCloseEnough("rect.width.baseVal.value", "200", 0.01);
+    shouldBeCloseEnough("rect.width.animVal.value", "199.98", 0.01);
+    shouldBeCloseEnough("rect.width.baseVal.value", "199.98", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
 var successfullyParsed = true;
index 1562327..cd635a6 100644 (file)
@@ -33,22 +33,20 @@ function sample2() {
 }
 
 function sample3() {
-    shouldBeCloseEnough("rect.width.animVal.value", "240", 0.01);
-    shouldBeCloseEnough("rect.width.baseVal.value", "240", 0.01);
+    shouldBeCloseEnough("rect.width.animVal.value", "239.96", 0.01);
+    shouldBeCloseEnough("rect.width.baseVal.value", "239.96", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
 var successfullyParsed = true;
index 3818108..1a416e1 100644 (file)
@@ -33,22 +33,20 @@ function sample2() {
 }
 
 function sample3() {
-    shouldBeCloseEnough("rect.width.animVal.value", "200", 0.01);
-    shouldBeCloseEnough("rect.width.baseVal.value", "200", 0.01);
+    shouldBeCloseEnough("rect.width.animVal.value", "199.98", 0.01);
+    shouldBeCloseEnough("rect.width.baseVal.value", "199.98", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
 var successfullyParsed = true;
index 59249f0..42ef1f4 100644 (file)
@@ -33,22 +33,20 @@ function sample2() {
 }
 
 function sample3() {
-    shouldBeCloseEnough("rect.width.animVal.value", "240", 0.01);
-    shouldBeCloseEnough("rect.width.baseVal.value", "240", 0.01);
+    shouldBeCloseEnough("rect.width.animVal.value", "239.96", 0.01);
+    shouldBeCloseEnough("rect.width.baseVal.value", "239.96", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
 var successfullyParsed = true;
index 9a7b7fa..70be810 100644 (file)
@@ -33,22 +33,20 @@ function sample2() {
 }
 
 function sample3() {
-    shouldBeCloseEnough("rect.width.animVal.value", "600", 0.1);
-    shouldBeCloseEnough("rect.width.baseVal.value", "600", 0.1);
+    shouldBeCloseEnough("rect.width.animVal.value", "599.88", 0.01);
+    shouldBeCloseEnough("rect.width.baseVal.value", "599.88", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
 var successfullyParsed = true;
index c81f9a9..16ea90a 100644 (file)
@@ -33,22 +33,20 @@ function sample2() {
 }
 
 function sample3() {
-    shouldBeCloseEnough("rect.width.animVal.value", "188.97", 0.01);
-    shouldBeCloseEnough("rect.width.baseVal.value", "188.97", 0.01);
+    shouldBeCloseEnough("rect.width.animVal.value", "188.96", 0.01);
+    shouldBeCloseEnough("rect.width.baseVal.value", "188.96", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
 var successfullyParsed = true;
index a379690..5fd3e4e 100644 (file)
@@ -33,22 +33,20 @@ function sample2() {
 }
 
 function sample3() {
-    shouldBeCloseEnough("rect.width.animVal.value", "200", 0.01);
-    shouldBeCloseEnough("rect.width.baseVal.value", "200", 0.01);
+    shouldBeCloseEnough("rect.width.animVal.value", "199.98", 0.01);
+    shouldBeCloseEnough("rect.width.baseVal.value", "199.98", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
 var successfullyParsed = true;
index eda4442..e25b174 100644 (file)
@@ -36,16 +36,14 @@ function sample3() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 1.5,    "rect", sample2],
-        ["animation", 2.5,    "rect", sample3],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0, sample1],
+        ["animation", 1.5, sample2],
+        ["animation", 2.5, sample3],
+        ["animation", 4.0, sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
 var successfullyParsed = true;
index 9e448c2..dc268cd 100644 (file)
@@ -42,24 +42,22 @@ function sample4() {
 }
 
 function sample5() {
-    shouldBeCloseEnough("rect.width.animVal.value", "266.7", 0.01);
-    shouldBeCloseEnough("rect.width.baseVal.value", "266.7", 0.01);
+    shouldBeCloseEnough("rect.width.animVal.value", "266.98", 0.01);
+    shouldBeCloseEnough("rect.width.baseVal.value", "266.98", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 1.0,    "rect", sample2],
-        ["animation", 2.0,    "rect", sample3],
-        ["animation", 3.0,    "rect", sample4],
-        ["animation", 3.9999, "rect", sample5],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 1.0,   sample2],
+        ["animation", 2.0,   sample3],
+        ["animation", 3.0,   sample4],
+        ["animation", 3.999, sample5],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
 var successfullyParsed = true;
index 86efafd..9707e16 100644 (file)
@@ -21,38 +21,36 @@ text.appendChild(animate);
 
 // Setup animation test
 function sample1() {
-       shouldBe("text.x.animVal.getItem(0).value", "50");
-       shouldBe("text.x.animVal.getItem(1).value", "70");
-       shouldBe("text.x.animVal.getItem(2).value", "90");
-       shouldBe("text.x.animVal.getItem(3).value", "110");
+    shouldBe("text.x.animVal.getItem(0).value", "50");
+    shouldBe("text.x.animVal.getItem(1).value", "70");
+    shouldBe("text.x.animVal.getItem(2).value", "90");
+    shouldBe("text.x.animVal.getItem(3).value", "110");
 }
 
 function sample2() {
-       shouldBe("text.x.animVal.getItem(0).value", "55");
-       shouldBe("text.x.animVal.getItem(1).value", "80");
-       shouldBe("text.x.animVal.getItem(2).value", "105");
-       shouldBe("text.x.animVal.getItem(3).value", "130");
+    shouldBe("text.x.animVal.getItem(0).value", "55");
+    shouldBe("text.x.animVal.getItem(1).value", "80");
+    shouldBe("text.x.animVal.getItem(2).value", "105");
+    shouldBe("text.x.animVal.getItem(3).value", "130");
 }
 
 function sample3() {
-       shouldBeCloseEnough("text.x.animVal.getItem(0).value", "60", 0.01);
-       shouldBeCloseEnough("text.x.animVal.getItem(1).value", "90", 0.01);
-       shouldBeCloseEnough("text.x.animVal.getItem(2).value", "120", 0.01);
-       shouldBeCloseEnough("text.x.animVal.getItem(3).value", "150", 0.01);
+    shouldBeCloseEnough("text.x.animVal.getItem(0).value", "60", 0.01);
+    shouldBeCloseEnough("text.x.animVal.getItem(1).value", "90", 0.01);
+    shouldBeCloseEnough("text.x.animVal.getItem(2).value", "120", 0.01);
+    shouldBeCloseEnough("text.x.animVal.getItem(3).value", "150", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "text", sample1],
-        ["animation", 2.0,    "text", sample2],
-        ["animation", 3.9999, "text", sample3],
-        ["animation", 4.0 ,   "text", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(51, 49)", 0);
 var successfullyParsed = true;
index 527a1f0..bfe2462 100644 (file)
@@ -35,24 +35,22 @@ function sample2() {
 }
 
 function sample3() {
-       shouldBeCloseEnough("text.x.animVal.getItem(0).value", "113.39", 0.01);
+       shouldBeCloseEnough("text.x.animVal.getItem(0).value", "113.37", 0.01);
        shouldBeCloseEnough("text.x.animVal.getItem(1).value", "80", 0.01);
-       shouldBeCloseEnough("text.x.animVal.getItem(2).value", "100", 0.01);
-       shouldBeCloseEnough("text.x.animVal.getItem(3).value", "383.99", 0.01);
+       shouldBeCloseEnough("text.x.animVal.getItem(2).value", "100.02", 0.01);
+       shouldBeCloseEnough("text.x.animVal.getItem(3).value", "383.91", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "text", sample1],
-        ["animation", 2.0,    "text", sample2],
-        ["animation", 3.9999, "text", sample3],
-        ["animation", 4.0 ,   "text", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(51, 49)", 0);
 var successfullyParsed = true;
index 56ce4de..cca41c9 100644 (file)
@@ -21,38 +21,36 @@ text.appendChild(animate);
 
 // Setup animation test
 function sample1() {
-       shouldBe("text.x.animVal.numberOfItems", "1");
-       shouldBe("text.x.animVal.getItem(0).value", "50");
+    shouldBe("text.x.animVal.numberOfItems", "1");
+    shouldBe("text.x.animVal.getItem(0).value", "50");
 }
 
 function sample2() {
-       shouldBe("text.x.animVal.numberOfItems", "4");
-       shouldBeCloseEnough("text.x.animVal.getItem(0).value", "70", 0.01);
-       shouldBeCloseEnough("text.x.animVal.getItem(1).value", "80", 0.01);
-       shouldBeCloseEnough("text.x.animVal.getItem(2).value", "90", 0.01);
-       shouldBeCloseEnough("text.x.animVal.getItem(3).value", "110", 0.01);
+    shouldBe("text.x.animVal.numberOfItems", "4");
+    shouldBeCloseEnough("text.x.animVal.getItem(0).value", "70", 0.01);
+    shouldBeCloseEnough("text.x.animVal.getItem(1).value", "80", 0.01);
+    shouldBeCloseEnough("text.x.animVal.getItem(2).value", "90", 0.01);
+    shouldBeCloseEnough("text.x.animVal.getItem(3).value", "110", 0.01);
 }
 
 function sample3() {
-       shouldBe("text.x.animVal.numberOfItems", "4");
-       shouldBeCloseEnough("text.x.animVal.getItem(0).value", "70", 0.01);
-       shouldBeCloseEnough("text.x.animVal.getItem(1).value", "80", 0.01);
-       shouldBeCloseEnough("text.x.animVal.getItem(2).value", "90", 0.01);
-       shouldBeCloseEnough("text.x.animVal.getItem(3).value", "110", 0.01);
+    shouldBe("text.x.animVal.numberOfItems", "4");
+    shouldBeCloseEnough("text.x.animVal.getItem(0).value", "70", 0.01);
+    shouldBeCloseEnough("text.x.animVal.getItem(1).value", "80", 0.01);
+    shouldBeCloseEnough("text.x.animVal.getItem(2).value", "90", 0.01);
+    shouldBeCloseEnough("text.x.animVal.getItem(3).value", "110", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "text", sample1],
-        ["animation", 2.0,    "text", sample2],
-        ["animation", 3.9999, "text", sample3],
-        ["animation", 4.0 ,   "text", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(51, 49)", 0);
 var successfullyParsed = true;
index 5c49492..85e3213 100644 (file)
@@ -21,39 +21,37 @@ text.appendChild(animate);
 
 // Setup animation test
 function sample1() {
-       shouldBe("text.x.animVal.getItem(0).value", "50");
-       shouldBe("text.x.animVal.getItem(1).value", "60");
-       shouldBe("text.x.animVal.getItem(2).value", "70");
-       shouldBe("text.x.animVal.getItem(3).value", "80");
+    shouldBe("text.x.animVal.getItem(0).value", "50");
+    shouldBe("text.x.animVal.getItem(1).value", "60");
+    shouldBe("text.x.animVal.getItem(2).value", "70");
+    shouldBe("text.x.animVal.getItem(3).value", "80");
 }
 
 function sample2() {
-       shouldBe("text.x.animVal.getItem(0).value", "60");
-       shouldBe("text.x.animVal.getItem(1).value", "70");
-       shouldBe("text.x.animVal.getItem(2).value", "80");
-       shouldBe("text.x.animVal.getItem(3).value", "90");
+    shouldBe("text.x.animVal.getItem(0).value", "60");
+    shouldBe("text.x.animVal.getItem(1).value", "70");
+    shouldBe("text.x.animVal.getItem(2).value", "80");
+    shouldBe("text.x.animVal.getItem(3).value", "90");
 }
 
 function sample3() {
-       shouldBe("text.x.animVal.numberOfItems", "4");
-       shouldBeCloseEnough("text.x.animVal.getItem(0).value", "70", 0.01);
-       shouldBeCloseEnough("text.x.animVal.getItem(1).value", "80", 0.01);
-       shouldBeCloseEnough("text.x.animVal.getItem(2).value", "90", 0.01);
-       shouldBeCloseEnough("text.x.animVal.getItem(3).value", "100", 0.01);
+    shouldBe("text.x.animVal.numberOfItems", "4");
+    shouldBeCloseEnough("text.x.animVal.getItem(0).value", "70", 0.01);
+    shouldBeCloseEnough("text.x.animVal.getItem(1).value", "80", 0.01);
+    shouldBeCloseEnough("text.x.animVal.getItem(2).value", "90", 0.01);
+    shouldBeCloseEnough("text.x.animVal.getItem(3).value", "100", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "text", sample1],
-        ["animation", 2.0,    "text", sample2],
-        ["animation", 3.9999, "text", sample3],
-        ["animation", 4.0 ,   "text", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(51, 49)", 0);
 var successfullyParsed = true;
index fb616ac..bb25821 100644 (file)
@@ -22,38 +22,36 @@ text.appendChild(animate);
 
 // Setup animation test
 function sample1() {
-       shouldBe("text.x.animVal.getItem(0).value", "50");
-       shouldBe("text.x.animVal.getItem(1).value", "60");
-       shouldBe("text.x.animVal.getItem(2).value", "70");
-       shouldBe("text.x.animVal.getItem(3).value", "80");
+    shouldBe("text.x.animVal.getItem(0).value", "50");
+    shouldBe("text.x.animVal.getItem(1).value", "60");
+    shouldBe("text.x.animVal.getItem(2).value", "70");
+    shouldBe("text.x.animVal.getItem(3).value", "80");
 }
 
 function sample2() {
-       shouldBe("text.x.animVal.getItem(0).value", "60");
-       shouldBe("text.x.animVal.getItem(1).value", "70");
-       shouldBe("text.x.animVal.getItem(2).value", "80");
-       shouldBe("text.x.animVal.getItem(3).value", "90");
+    shouldBe("text.x.animVal.getItem(0).value", "60");
+    shouldBe("text.x.animVal.getItem(1).value", "70");
+    shouldBe("text.x.animVal.getItem(2).value", "80");
+    shouldBe("text.x.animVal.getItem(3).value", "90");
 }
 
 function sample3() {
-       shouldBeCloseEnough("text.x.animVal.getItem(0).value", "70", 0.01);
-       shouldBeCloseEnough("text.x.animVal.getItem(1).value", "80", 0.01);
-       shouldBeCloseEnough("text.x.animVal.getItem(2).value", "90", 0.01);
-       shouldBeCloseEnough("text.x.animVal.getItem(3).value", "100", 0.01);
+    shouldBeCloseEnough("text.x.animVal.getItem(0).value", "70", 0.01);
+    shouldBeCloseEnough("text.x.animVal.getItem(1).value", "80", 0.01);
+    shouldBeCloseEnough("text.x.animVal.getItem(2).value", "90", 0.01);
+    shouldBeCloseEnough("text.x.animVal.getItem(3).value", "100", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "text", sample1],
-        ["animation", 2.0,    "text", sample2],
-        ["animation", 3.9999, "text", sample3],
-        ["animation", 4.0 ,   "text", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(51, 49)", 0);
 var successfullyParsed = true;
index ecc69e8..feae318 100644 (file)
@@ -39,16 +39,14 @@ function sample3() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0,      "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4,      "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
 var successfullyParsed = true;
index 67d9788..a09416d 100644 (file)
@@ -39,16 +39,14 @@ function sample3() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0,      "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4,      "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
 var successfullyParsed = true;
index a55b1be..11d4931 100644 (file)
@@ -39,16 +39,14 @@ function sample3() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0,      "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4,      "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
 var successfullyParsed = true;
index f5a95e3..f2b359a 100644 (file)
@@ -23,38 +23,36 @@ rootSVGElement.appendChild(text);
 
 // Setup animation test
 function sample1() {
-       shouldBe("text.rotate.animVal.getItem(0).value", "0");
-       shouldBe("text.rotate.animVal.getItem(1).value", "0");
-       shouldBe("text.rotate.animVal.getItem(2).value", "0");
-       shouldBe("text.rotate.animVal.getItem(3).value", "0");
+    shouldBe("text.rotate.animVal.getItem(0).value", "0");
+    shouldBe("text.rotate.animVal.getItem(1).value", "0");
+    shouldBe("text.rotate.animVal.getItem(2).value", "0");
+    shouldBe("text.rotate.animVal.getItem(3).value", "0");
 }
 
 function sample2() {
-       shouldBeCloseEnough("text.rotate.animVal.getItem(0).value", "22.5", 0.01);
-       shouldBeCloseEnough("text.rotate.animVal.getItem(1).value", "45", 0.01);
-       shouldBeCloseEnough("text.rotate.animVal.getItem(2).value", "67.5", 0.01);
-       shouldBeCloseEnough("text.rotate.animVal.getItem(3).value", "90", 0.01);
+    shouldBeCloseEnough("text.rotate.animVal.getItem(0).value", "22.5", 0.01);
+    shouldBeCloseEnough("text.rotate.animVal.getItem(1).value", "45", 0.01);
+    shouldBeCloseEnough("text.rotate.animVal.getItem(2).value", "67.5", 0.01);
+    shouldBeCloseEnough("text.rotate.animVal.getItem(3).value", "90", 0.01);
 }
 
 function sample3() {
-       shouldBeCloseEnough("text.rotate.animVal.getItem(0).value", "45", 0.01);
-       shouldBeCloseEnough("text.rotate.animVal.getItem(1).value", "90", 0.01);
-       shouldBeCloseEnough("text.rotate.animVal.getItem(2).value", "135", 0.01);
-       shouldBeCloseEnough("text.rotate.animVal.getItem(3).value", "180", 0.01);
+    shouldBeCloseEnough("text.rotate.animVal.getItem(0).value", "44.99", 0.01);
+    shouldBeCloseEnough("text.rotate.animVal.getItem(1).value", "89.98", 0.01);
+    shouldBeCloseEnough("text.rotate.animVal.getItem(2).value", "134.96", 0.01);
+    shouldBeCloseEnough("text.rotate.animVal.getItem(3).value", "179.96", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4.0 ,   "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(41, 59)", 0);
 var successfullyParsed = true;
index 5ba6838..1ea6bec 100644 (file)
@@ -23,38 +23,36 @@ rootSVGElement.appendChild(text);
 
 // Setup animation test
 function sample1() {
-       shouldBe("text.rotate.animVal.getItem(0).value", "0");
-       shouldBe("text.rotate.animVal.getItem(1).value", "45");
-       shouldBe("text.rotate.animVal.getItem(2).value", "90");
-       shouldBe("text.rotate.animVal.getItem(3).value", "135");
+    shouldBe("text.rotate.animVal.getItem(0).value", "0");
+    shouldBe("text.rotate.animVal.getItem(1).value", "45");
+    shouldBe("text.rotate.animVal.getItem(2).value", "90");
+    shouldBe("text.rotate.animVal.getItem(3).value", "153");
 }
 
 function sample2() {
-       shouldBeCloseEnough("text.rotate.animVal.getItem(0).value", "22.5", 0.01);
-       shouldBeCloseEnough("text.rotate.animVal.getItem(1).value", "67.5", 0.01);
-       shouldBeCloseEnough("text.rotate.animVal.getItem(2).value", "112.5", 0.01);
-       shouldBeCloseEnough("text.rotate.animVal.getItem(3).value", "157.5", 0.01);
+    shouldBeCloseEnough("text.rotate.animVal.getItem(0).value", "22.5", 0.01);
+    shouldBeCloseEnough("text.rotate.animVal.getItem(1).value", "67.5", 0.01);
+    shouldBeCloseEnough("text.rotate.animVal.getItem(2).value", "112.5", 0.01);
+    shouldBeCloseEnough("text.rotate.animVal.getItem(3).value", "157.5", 0.01);
 }
 
 function sample3() {
-       shouldBeCloseEnough("text.rotate.animVal.getItem(0).value", "45", 0.01);
-       shouldBeCloseEnough("text.rotate.animVal.getItem(1).value", "90", 0.01);
-       shouldBeCloseEnough("text.rotate.animVal.getItem(2).value", "135", 0.01);
-       shouldBeCloseEnough("text.rotate.animVal.getItem(3).value", "180", 0.01);
+    shouldBeCloseEnough("text.rotate.animVal.getItem(0).value", "44.99", 0.01);
+    shouldBeCloseEnough("text.rotate.animVal.getItem(1).value", "89.98", 0.01);
+    shouldBeCloseEnough("text.rotate.animVal.getItem(2).value", "134.99", 0.01);
+    shouldBeCloseEnough("text.rotate.animVal.getItem(3).value", "179.99", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "text", sample1],
-        ["animation", 2.0,    "text", sample2],
-        ["animation", 3.9999, "text", sample3],
-        ["animation", 4.0 ,   "text", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(41, 59)", 0);
 var successfullyParsed = true;
index 938517d..079e963 100644 (file)
@@ -40,32 +40,30 @@ feGaussianBlur.appendChild(animate);
 
 // Setup animation test
 function sample1() {
-       shouldBe("feGaussianBlur.stdDeviationX.animVal", "5");
-       shouldBe("feGaussianBlur.stdDeviationY.animVal", "5");
+    shouldBe("feGaussianBlur.stdDeviationX.animVal", "5");
+    shouldBe("feGaussianBlur.stdDeviationY.animVal", "5");
 }
 
 function sample2() {
-       shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "22.5", 0.01);
-       shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "7.5", 0.01);
+    shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "22.5", 0.01);
+    shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "7.5", 0.01);
 }
 
 function sample3() {
-       shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "40", 0.01);
-       shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "10", 0.01);
+    shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "40", 0.01);
+    shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "10", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "blur", sample1],
-        ["animation", 2.0,    "blur", sample2],
-        ["animation", 3.9999, "blur", sample3],
-        ["animation", 4.0 ,   "blur", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(60, 60)", 0);
 var successfullyParsed = true;
index f8c5337..0f128a5 100644 (file)
@@ -40,32 +40,30 @@ feGaussianBlur.appendChild(animate);
 
 // Setup animation test
 function sample1() {
-       shouldBe("feGaussianBlur.stdDeviationX.animVal", "5");
-       shouldBe("feGaussianBlur.stdDeviationY.animVal", "5");
+    shouldBe("feGaussianBlur.stdDeviationX.animVal", "5");
+    shouldBe("feGaussianBlur.stdDeviationY.animVal", "5");
 }
 
 function sample2() {
-       shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "22.5", 0.01);
-       shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "7.5", 0.01);
+    shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "22.5", 0.01);
+    shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "7.5", 0.01);
 }
 
 function sample3() {
-       shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "40", 0.01);
-       shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "10", 0.01);
+    shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "40", 0.01);
+    shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "10", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "blur", sample1],
-        ["animation", 2.0,    "blur", sample2],
-        ["animation", 3.9999, "blur", sample3],
-        ["animation", 4.0 ,   "blur", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(60, 60)", 0);
 var successfullyParsed = true;
index 184715c..71b7f34 100644 (file)
@@ -40,32 +40,30 @@ feGaussianBlur.appendChild(animate);
 
 // Setup animation test
 function sample1() {
-       shouldBe("feGaussianBlur.stdDeviationX.animVal", "40");
-       shouldBe("feGaussianBlur.stdDeviationY.animVal", "10");
+    shouldBe("feGaussianBlur.stdDeviationX.animVal", "40");
+    shouldBe("feGaussianBlur.stdDeviationY.animVal", "10");
 }
 
 function sample2() {
-       shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "22.5", 0.01);
-       shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "7.5", 0.01);
+    shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "22.5", 0.01);
+    shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "7.5", 0.01);
 }
 
 function sample3() {
-       shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "5", 0.01);
-       shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "5", 0.01);
+    shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "5", 0.01);
+    shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "5", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "blur", sample1],
-        ["animation", 2.0,    "blur", sample2],
-        ["animation", 3.9999, "blur", sample3],
-        ["animation", 4.0 ,   "blur", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(60, 60)", 0);
 var successfullyParsed = true;
index 9f2104c..e9fd27d 100644 (file)
@@ -40,32 +40,30 @@ feGaussianBlur.appendChild(animate);
 
 // Setup animation test
 function sample1() {
-       shouldBe("feGaussianBlur.stdDeviationX.animVal", "5");
-       shouldBe("feGaussianBlur.stdDeviationY.animVal", "5");
+    shouldBe("feGaussianBlur.stdDeviationX.animVal", "5");
+    shouldBe("feGaussianBlur.stdDeviationY.animVal", "5");
 }
 
 function sample2() {
-       shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "10", 0.01);
-       shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "10", 0.01);
+    shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "10", 0.01);
+    shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "10", 0.01);
 }
 
 function sample3() {
-       shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "15", 0.01);
-       shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "15", 0.01);
+    shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "15", 0.01);
+    shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "15", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "blur", sample1],
-        ["animation", 2.0,    "blur", sample2],
-        ["animation", 3.9999, "blur", sample3],
-        ["animation", 4.0 ,   "blur", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(60, 60)", 0);
 var successfullyParsed = true;
index 35f5d3b..ceeede4 100644 (file)
@@ -32,22 +32,20 @@ function sample2() {
 }
 
 function sample3() {
-    shouldBeCloseEnough("path.pathSegList.getItem(0).x", "0", 0.01);
-    shouldBeCloseEnough("path.pathSegList.getItem(0).y", "0", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(0).x", "0.01", 0.01);
+    shouldBeCloseEnough("path.pathSegList.getItem(0).y", "0.01", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "path", sample1],
-        ["animation", 2.0,    "path", sample2],
-        ["animation", 3.9999, "path", sample3],
-        ["animation", 4.0 ,   "path", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
index 0b70ee7..2b3da31 100644 (file)
@@ -37,24 +37,22 @@ function sample2() {
 
 function sample3() {
     // Check just before-end conditions
-    shouldBeCloseEnough("poly.points.getItem(2).x", "100", 0.01);
-    shouldBeCloseEnough("poly.points.getItem(2).y", "100", 0.01);
+    shouldBeCloseEnough("poly.points.getItem(2).x", "100.02", 0.01);
+    shouldBeCloseEnough("poly.points.getItem(2).y", "100.02", 0.01);
     //shouldBeCloseEnough("poly.animatedPoints.getItem(2).x", "300", 0.01);
     //shouldBeCloseEnough("poly.animatedPoints.getItem(2).y", "300", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "poly", sample1],
-        ["animation", 2.0,    "poly", sample2],
-        ["animation", 3.9999, "poly", sample3],
-        ["animation", 4.0 ,   "poly", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(15, 30)", 0);
 var successfullyParsed = true;
index e16cde1..cb6044a 100644 (file)
@@ -37,24 +37,22 @@ function sample2() {
 
 function sample3() {
     // Check just before-end conditions
-    shouldBeCloseEnough("poly.points.getItem(2).x", "300", 0.01);
-    shouldBeCloseEnough("poly.points.getItem(2).y", "300", 0.01);
+    shouldBeCloseEnough("poly.points.getItem(2).x", "299.98", 0.01);
+    shouldBeCloseEnough("poly.points.getItem(2).y", "299.98", 0.01);
     //shouldBeCloseEnough("poly.animatedPoints.getItem(2).x", "300", 0.01);
     //shouldBeCloseEnough("poly.animatedPoints.getItem(2).y", "300", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "poly", sample1],
-        ["animation", 2.0,    "poly", sample2],
-        ["animation", 3.9999, "poly", sample3],
-        ["animation", 4.0 ,   "poly", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(15, 30)", 0);
 var successfullyParsed = true;
index 1435fc3..6bd363e 100644 (file)
@@ -48,29 +48,27 @@ function sample2() {
 }
 
 function sample3() {
-    shouldBeCloseEnough("rootSVGElement.viewBox.animVal.x", "50", 0.01);
-    shouldBeCloseEnough("rootSVGElement.viewBox.animVal.y", "50", 0.01);
-    shouldBeCloseEnough("rootSVGElement.viewBox.animVal.width", "50", 0.01);
-    shouldBeCloseEnough("rootSVGElement.viewBox.animVal.height", "50", 0.01);
+    shouldBeCloseEnough("rootSVGElement.viewBox.animVal.x", "49.98", 0.01);
+    shouldBeCloseEnough("rootSVGElement.viewBox.animVal.y", "49.98", 0.01);
+    shouldBeCloseEnough("rootSVGElement.viewBox.animVal.width", "50.01", 0.01);
+    shouldBeCloseEnough("rootSVGElement.viewBox.animVal.height", "50.01", 0.01);
 
-    shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.x", "50", 0.01);
-    shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.y", "50", 0.01);
-    shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.width", "50", 0.01);
-    shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.height", "50", 0.01);
+    shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.x", "49.98", 0.01);
+    shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.y", "49.98", 0.01);
+    shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.width", "50.01", 0.01);
+    shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.height", "50.01", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "svg", sample1],
-        ["animation", 2.0,    "svg", sample2],
-        ["animation", 3.9999, "svg", sample3],
-        ["animation", 4.0 ,   "svg", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
 var successfullyParsed = true;
index edad743..a61b61b 100644 (file)
@@ -48,29 +48,27 @@ function sample2() {
 }
 
 function sample3() {
-    shouldBeCloseEnough("rootSVGElement.viewBox.animVal.x", "50", 0.01);
-    shouldBeCloseEnough("rootSVGElement.viewBox.animVal.y", "50", 0.01);
-    shouldBeCloseEnough("rootSVGElement.viewBox.animVal.width", "150", 0.01);
-    shouldBeCloseEnough("rootSVGElement.viewBox.animVal.height", "150", 0.01);
+    shouldBeCloseEnough("rootSVGElement.viewBox.animVal.x", "49.98", 0.01);
+    shouldBeCloseEnough("rootSVGElement.viewBox.animVal.y", "49.98", 0.01);
+    shouldBeCloseEnough("rootSVGElement.viewBox.animVal.width", "149.98", 0.01);
+    shouldBeCloseEnough("rootSVGElement.viewBox.animVal.height", "149.98", 0.01);
 
-    shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.x", "50", 0.01);
-    shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.y", "50", 0.01);
-    shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.width", "150", 0.01);
-    shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.height", "150", 0.01);
+    shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.x", "49.98", 0.01);
+    shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.y", "49.98", 0.01);
+    shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.width", "149.98", 0.01);
+    shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.height", "149.98", 0.01);
 }
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "svg", sample1],
-        ["animation", 2.0,    "svg", sample2],
-        ["animation", 3.9999, "svg", sample3],
-        ["animation", 4.0 ,   "svg", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
 var successfullyParsed = true;
index 801ed89..f91a7b2 100644 (file)
@@ -19,8 +19,6 @@ animate.setAttribute("values", "visible ; hidden ; visible");
 rect.appendChild(animate);
 rootSVGElement.appendChild(rect);
 
-var computedStyle = rect.ownerDocument.defaultView.getComputedStyle(rect);
-
 // Setup animation test
 function sample1() {
     // Check initial/end conditions
@@ -37,16 +35,14 @@ function sample3() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 1.9999, "rect", sample1],
-        ["animation", 2,      "rect", sample2],
-        ["animation", 3.9999, "rect", sample3],
-        ["animation", 4,      "rect", sample1]
+        // [animationId, time, sampleCallback]
+        ["animation", 1.999, sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 5.999, sample3],
+        ["animation", 6.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 30)", 0);
 var successfullyParsed = true;
index be43752..4ae352e 100644 (file)
@@ -49,15 +49,13 @@ function sample3() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,    "rect", sample1],
-        ["animation", 2.0,    "rect", sample2],
-        ["animation", 3.9999, "rect", sample3]
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 2.0,   sample2],
+        ["animation", 3.999, sample3]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
index 10dea0c..63ba658 100644 (file)
@@ -50,17 +50,16 @@ function sample3() {
 
 function executeTest() {
     const expectedValues = [
-        // [animationId, time, elementId, sampleCallback]
-        ["animation", 0.0,  "rect", sample1],
-        ["animation", 0.001,  "rect", sample2],
-        ["animation", 1.0,    "rect", sample2],
-        ["animation", 3.0,    "rect", sample3],
-        ["animation", 3.9999, "rect", sample3],
+        // [animationId, time, sampleCallback]
+        ["animation", 0.0,   sample1],
+        ["animation", 0.001, sample2],
+        ["animation", 1.0,   sample2],
+        ["animation", 3.0,   sample3],
+        ["animation", 3.999, sample3],
+        ["animation", 4.0,   sample1]
     ];
 
     runAnimationTest(expectedValues);
 }
 
-// Begin test async
-window.setTimeout("triggerUpdate(50, 50)", 0);
 var successfullyParsed = true;
index 2b5c643..55ee0e0 100644 (file)
@@ -1,5 +1,5 @@
 <html>\r
-    <body>\r
+    <body onload="runSMILTest()">\r
         <svg>\r
             <animAttributeAttrs>\r
                 <feImage id="test"></feImage>\r
index 174f322..c4f35e0 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index df5a9a1..fa12df9 100644 (file)
@@ -9,8 +9,8 @@ PASS marker.orientAngle.animVal.value is 0
 PASS marker.orientAngle.baseVal.value is 0
 PASS marker.orientAngle.animVal.value is 90
 PASS marker.orientAngle.baseVal.value is 90
-PASS marker.orientAngle.animVal.value is 180
-PASS marker.orientAngle.baseVal.value is 180
+PASS marker.orientAngle.animVal.value is 179.96
+PASS marker.orientAngle.baseVal.value is 179.96
 PASS marker.orientAngle.animVal.value is 0
 PASS marker.orientAngle.baseVal.value is 0
 PASS successfullyParsed is true
index 8cc5c6d..94b0258 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index c4f2268..4e91759 100644 (file)
@@ -9,8 +9,8 @@ PASS marker.orientAngle.animVal.value is 0
 PASS marker.orientAngle.baseVal.value is 0
 PASS marker.orientAngle.animVal.value is 90
 PASS marker.orientAngle.baseVal.value is 90
-PASS marker.orientAngle.animVal.value is 180
-PASS marker.orientAngle.baseVal.value is 180
+PASS marker.orientAngle.animVal.value is 179.96
+PASS marker.orientAngle.baseVal.value is 179.96
 PASS marker.orientAngle.animVal.value is 0
 PASS marker.orientAngle.baseVal.value is 0
 PASS successfullyParsed is true
index 260bd90..10ba5f8 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 8973ac0..41a465f 100644 (file)
@@ -9,8 +9,8 @@ PASS marker.orientAngle.animVal.value is 0
 PASS marker.orientAngle.baseVal.value is 0
 PASS marker.orientAngle.animVal.value is 90
 PASS marker.orientAngle.baseVal.value is 90
-PASS marker.orientAngle.animVal.value is 180
-PASS marker.orientAngle.baseVal.value is 180
+PASS marker.orientAngle.animVal.value is 179.96
+PASS marker.orientAngle.baseVal.value is 179.96
 PASS marker.orientAngle.animVal.value is 0
 PASS marker.orientAngle.baseVal.value is 0
 PASS successfullyParsed is true
index 1bc9b89..f0f7203 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index fe0e6db..c55136a 100644 (file)
@@ -9,8 +9,8 @@ PASS marker.orientAngle.animVal.value is 0
 PASS marker.orientAngle.baseVal.value is 0
 PASS marker.orientAngle.animVal.value is 90
 PASS marker.orientAngle.baseVal.value is 90
-PASS marker.orientAngle.animVal.value is 180
-PASS marker.orientAngle.baseVal.value is 180
+PASS marker.orientAngle.animVal.value is 179.96
+PASS marker.orientAngle.baseVal.value is 179.96
 PASS marker.orientAngle.animVal.value is 0
 PASS marker.orientAngle.baseVal.value is 0
 PASS successfullyParsed is true
index 9c3954d..27fa2cb 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index 8b6c151..a35e553 100644 (file)
@@ -9,8 +9,8 @@ PASS marker.orientAngle.animVal.value is 0
 PASS marker.orientAngle.baseVal.value is 0
 PASS marker.orientAngle.animVal.value is 90
 PASS marker.orientAngle.baseVal.value is 90
-PASS marker.orientAngle.animVal.value is 180
-PASS marker.orientAngle.baseVal.value is 180
+PASS marker.orientAngle.animVal.value is 179.96
+PASS marker.orientAngle.baseVal.value is 179.96
 PASS marker.orientAngle.animVal.value is 0
 PASS marker.orientAngle.baseVal.value is 0
 PASS successfullyParsed is true
index 16e719c..a95de76 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>
index fd0a94b..2656cb6 100644 (file)
@@ -9,8 +9,8 @@ PASS marker.orientAngle.animVal.value is 0
 PASS marker.orientAngle.baseVal.value is 0
 PASS marker.orientAngle.animVal.value is 90
 PASS marker.orientAngle.baseVal.value is 90
-PASS marker.orientAngle.animVal.value is 180
-PASS marker.orientAngle.baseVal.value is 180
+PASS marker.orientAngle.animVal.value is 179.96
+PASS marker.orientAngle.baseVal.value is 179.96
 PASS marker.orientAngle.animVal.value is 0
 PASS marker.orientAngle.baseVal.value is 0
 PASS successfullyParsed is true
index 1c5091e..459af56 100644 (file)
@@ -5,7 +5,7 @@
 <script src="../dynamic-updates/resources/SVGTestCase.js"></script>
 <script src="resources/SVGAnimationTestCase.js"></script>
 </head>
-<body>
+<body onload="runSMILTest()">
 <h1>SVG 1.1 dynamic animation tests</h1>
 <p id="description"></p>
 <div id="console"></div>