+2012-02-14 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
+
+ Rubber-stamped by Simon Hausmann.
+
+ Further cleanup of the svg/animation tests. Always use "0.001" as sampling time
+ for "just-after-anim-begin" instead of 0.1/0.01 variations. Use "3.999" as
+ "just-before-anim-end" time instead of 3.9/3.99 variations.
+
+ Use a default tolerance of 0.1, instead of the strict 0.01, to avoid having
+ to expect values like "199.98". Use "200" instead. That doesn't reduce the
+ value of any of the tests, but its likely to be more stable.
+
+ Changed some real-quick running animamtions to have a higher duration.
+ This minimizes the sampling time error when sampling the animation right after
+ it started (svg/animation/*nested-transforms*). This doesn't affect the runtime
+ of the tests at all, as we manually drive the timeline anyways.
+
+ Always use shouldBe() instead of shouldBeCloseEnough() if the sampling time
+ is an integer, like 2.0 for animations that eg. animate x from 0 to 200.
+ Sampling exactly at 2.0, yields 100, so there's no need to check for equal
+ with tolerance.
+
+ * platform/chromium/test_expectations.txt:
+ * svg/animations/animate-calcMode-spline-by-expected.txt:
+ * svg/animations/animate-calcMode-spline-from-by-expected.txt:
+ * svg/animations/animate-calcMode-spline-from-to-expected.txt:
+ * svg/animations/animate-calcMode-spline-to-expected.txt:
+ * svg/animations/animate-calcMode-spline-values-expected.txt:
+ * svg/animations/animate-path-animation-Cc-Ss-expected.txt:
+ * svg/animations/animate-path-animation-Ll-Vv-Hh-expected.txt:
+ * svg/animations/animate-path-animation-cC-sS-inverse-expected.txt:
+ * svg/animations/animate-path-animation-lL-vV-hH-inverse-expected.txt:
+ * svg/animations/animate-path-nested-transforms-expected.txt:
+ * svg/animations/animate-path-to-animation-expected.txt:
+ * svg/animations/animate-text-nested-transforms-expected.txt:
+ * svg/animations/resources/SVGAnimationTestCase.js:
+ (shouldBeCloseEnough):
+ * svg/animations/script-tests/animVal-basics.js:
+ (sample3):
+ * svg/animations/script-tests/animate-calcMode-spline-by.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/animate-calcMode-spline-from-by.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/animate-calcMode-spline-from-to.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/animate-calcMode-spline-to.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/animate-calcMode-spline-values.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/animate-color-rgba-calcMode-discrete.js:
+ (executeTest):
+ * svg/animations/script-tests/animate-dynamic-update-attributeName.js:
+ (executeTest):
+ * svg/animations/script-tests/animate-end-attribute.js:
+ (sample3):
+ * svg/animations/script-tests/animate-mpath-insert.js:
+ (endSample):
+ (executeTest):
+ * svg/animations/script-tests/animate-path-animation-Cc-Ss.js:
+ (sample2):
+ (sample3):
+ (sample4):
+ * svg/animations/script-tests/animate-path-animation-Ll-Vv-Hh.js:
+ (sample2):
+ (sample3):
+ (sample4):
+ * svg/animations/script-tests/animate-path-animation-Qq-Tt.js:
+ (sample2):
+ (sample3):
+ (sample4):
+ * svg/animations/script-tests/animate-path-animation-cC-sS-inverse.js:
+ (sample2):
+ (sample3):
+ (sample4):
+ * svg/animations/script-tests/animate-path-animation-lL-vV-hH-inverse.js:
+ (sample2):
+ (sample3):
+ (sample4):
+ * svg/animations/script-tests/animate-path-animation-qQ-tT-inverse.js:
+ (sample2):
+ (sample3):
+ (sample4):
+ * svg/animations/script-tests/animate-path-nested-transforms.js:
+ (endSample):
+ (executeTest):
+ * svg/animations/script-tests/animate-path-to-animation.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/animate-text-nested-transforms.js:
+ (endSample):
+ (executeTest):
+ * svg/animations/script-tests/animateTransform-pattern-transform.js:
+ (sample3):
+ * svg/animations/script-tests/svgangle-animation-deg-to-grad.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svgangle-animation-deg-to-rad.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svgangle-animation-grad-to-deg.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svgangle-animation-grad-to-rad.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svgangle-animation-rad-to-deg.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svgangle-animation-rad-to-grad.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svginteger-animation-1.js:
+ (sample3):
+ * svg/animations/script-tests/svglength-animation-LengthModeHeight.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svglength-animation-LengthModeOther.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svglength-animation-LengthModeWidth.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svglength-animation-number-to-number.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svglength-animation-px-to-cm.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svglength-animation-px-to-ems.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svglength-animation-px-to-exs.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svglength-animation-px-to-in.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svglength-animation-px-to-number.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svglength-animation-px-to-pc.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svglength-animation-px-to-percentage.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svglength-animation-px-to-pt.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svglength-animation-px-to-px.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svglength-animation-values.js:
+ (sample2):
+ (sample3):
+ (sample4):
+ (sample5):
+ * svg/animations/script-tests/svglengthlist-animation-1.js:
+ (sample3):
+ * svg/animations/script-tests/svglengthlist-animation-2.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svglengthlist-animation-3.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svglengthlist-animation-4.js:
+ (sample3):
+ * svg/animations/script-tests/svglengthlist-animation-5.js:
+ (sample3):
+ * svg/animations/script-tests/svgnumber-animation-1.js:
+ (sample3):
+ * svg/animations/script-tests/svgnumber-animation-2.js:
+ (sample3):
+ * svg/animations/script-tests/svgnumberlist-animation-1.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svgnumberlist-animation-2.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svgnumberoptionalnumber-animation-1.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svgnumberoptionalnumber-animation-2.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svgnumberoptionalnumber-animation-3.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svgnumberoptionalnumber-animation-4.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svgpath-animation-1.js:
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svgpointlist-animation-1.js:
+ (sample3):
+ * svg/animations/script-tests/svgpointlist-animation-2.js:
+ (sample3):
+ * svg/animations/script-tests/svgrect-animation-1.js:
+ (sample3):
+ * svg/animations/script-tests/svgrect-animation-2.js:
+ (sample3):
+ * svg/animations/script-tests/svgtransform-animation-1.js:
+ (sample1):
+ (sample2):
+ (sample3):
+ * svg/animations/script-tests/svgtransform-animation-discrete.js:
+ (sample1):
+ (sample2):
+ (sample3):
+ * svg/animations/svgangle-animation-deg-to-grad-expected.txt:
+ * svg/animations/svgangle-animation-deg-to-rad-expected.txt:
+ * svg/animations/svgangle-animation-grad-to-deg-expected.txt:
+ * svg/animations/svgangle-animation-grad-to-rad-expected.txt:
+ * svg/animations/svgangle-animation-rad-to-deg-expected.txt:
+ * svg/animations/svgangle-animation-rad-to-grad-expected.txt:
+ * svg/animations/svglength-animation-LengthModeHeight-expected.txt:
+ * svg/animations/svglength-animation-LengthModeOther-expected.txt:
+ * svg/animations/svglength-animation-LengthModeWidth-expected.txt:
+ * svg/animations/svglength-animation-number-to-number-expected.txt:
+ * svg/animations/svglength-animation-px-to-cm-expected.txt:
+ * svg/animations/svglength-animation-px-to-ems-expected.txt:
+ * svg/animations/svglength-animation-px-to-exs-expected.txt:
+ * svg/animations/svglength-animation-px-to-in-expected.txt:
+ * svg/animations/svglength-animation-px-to-number-expected.txt:
+ * svg/animations/svglength-animation-px-to-pc-expected.txt:
+ * svg/animations/svglength-animation-px-to-percentage-expected.txt:
+ * svg/animations/svglength-animation-px-to-pt-expected.txt:
+ * svg/animations/svglength-animation-px-to-px-expected.txt:
+ * svg/animations/svglength-animation-values-expected.txt:
+ * svg/animations/svglengthlist-animation-2-expected.txt:
+ * svg/animations/svgnumberlist-animation-1-expected.txt:
+ * svg/animations/svgnumberlist-animation-2-expected.txt:
+ * svg/animations/svgpath-animation-1-expected.txt:
+ * svg/animations/svgpointlist-animation-1-expected.txt:
+ * svg/animations/svgpointlist-animation-2-expected.txt:
+ * svg/animations/svgrect-animation-1-expected.txt:
+ * svg/animations/svgrect-animation-2-expected.txt:
+ * svg/animations/svgtransform-animation-1-expected.txt:
+
2012-02-15 Philippe Normand <pnormand@igalia.com>
Unreviewed, GTK rebaseline after r107785 and r107762. Also
// from http://trac.webkit.org/changeset/53086 (expectation changed in above WK roll, was IMAGE+TEXT)
BUGCR32153AND61406 LINUX WIN : svg/dynamic-updates/SVGTextElement-svgdom-rotate-prop.html = IMAGE
-// See also https://webkit.org/b/49045
-BUGCR61978 : svg/animations/animate-path-nested-transforms.html = PASS CRASH TEXT
-BUGCR61978 : svg/animations/animate-text-nested-transforms.html = PASS CRASH TEXT
-
// New test; was added in http://trac.webkit.org/changeset/68520
BUGWK46735 SKIP WONTFIX WIN : platform/win/plugins/window-geometry-initialized-before-set-window.html = CRASH TEXT
// Added in WebKit r70265
BUGCR88311 LINUX WIN DEBUG : fast/css/last-of-type-pseudo-class.html = PASS TEXT
-BUGWK63902 MAC WIN : svg/animations/svgtransform-animation-1.html = PASS TEXT
-
// Started around WebKit r90233:r90242
BUGWK64000 SNOWLEOPARD DEBUG : fast/events/click-focus-anchor.html = PASS TEXT
BUGWK64003 DEBUG : media/video-delay-load-event.html = PASS TEXT
BUG_LEVIN MAC DEBUG : svg/custom/object-no-size-attributes.xhtml = PASS IMAGE+TEXT
-BUGWK68372 SNOWLEOPARD : svg/animations/svglength-animation-px-to-exs.html = PASS CRASH
-
// Tests that are known to fail on Mac10.6 with CPU-Skia graphics.
BUGWK68436 SNOWLEOPARD CPU DEBUG : fast/repaint/background-clip-text.html = TIMEOUT
BUGWK68436 SNOWLEOPARD CPU : fast/repaint/text-emphasis-h.html = TIMEOUT IMAGE
BUGWK75478 : fast/html/details-remove-summary-2-and-click.html = IMAGE
BUGWK75478 : fast/html/details-add-summary-9-and-click.html = IMAGE
+// Needs investigation.
+BUGWK78422: svg/animations/animate-text-nested-transforms.html = TEXT
+
BUGV8_1948 : fast/js/dfg-put-by-id-prototype-check.html = TEXT
BUGWK78529 LINUX DEBUG GPU : fast/canvas/canvas-text-alignment.html = IMAGE
PASS rect.x.baseVal.value is 100
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 0
+PASS rect.x.baseVal.value is 0
PASS rect.x.animVal.value is 100
PASS rect.x.baseVal.value is 100
PASS successfullyParsed is true
PASS rect.x.baseVal.value is 100
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 0
+PASS rect.x.baseVal.value is 0
PASS rect.x.animVal.value is 100
PASS rect.x.baseVal.value is 100
PASS successfullyParsed is true
PASS rect.x.baseVal.value is 100
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 0
+PASS rect.x.baseVal.value is 0
PASS rect.x.animVal.value is 100
PASS rect.x.baseVal.value is 100
PASS successfullyParsed is true
PASS rect.x.baseVal.value is 100
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 0
+PASS rect.x.baseVal.value is 0
PASS rect.x.animVal.value is 100
PASS rect.x.baseVal.value is 100
PASS successfullyParsed is true
PASS rect.x.baseVal.value is 100
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 0
+PASS rect.x.baseVal.value is 0
PASS rect.x.animVal.value is 100
PASS rect.x.baseVal.value is 100
PASS successfullyParsed is true
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.01
+PASS path.pathSegList.getItem(1).x1 is 0
PASS path.pathSegList.getItem(1).y1 is 40
-PASS path.pathSegList.getItem(1).x2 is 0.01
+PASS path.pathSegList.getItem(1).x2 is 0
PASS path.pathSegList.getItem(1).y2 is 40
PASS path.pathSegList.getItem(2).pathSegTypeAsLetter is 's'
-PASS path.pathSegList.getItem(2).x is -0.01
+PASS path.pathSegList.getItem(2).x is -0
PASS path.pathSegList.getItem(2).y is -40
PASS path.pathSegList.getItem(2).x2 is 40
-PASS path.pathSegList.getItem(2).y2 is 0.01
+PASS path.pathSegList.getItem(2).y2 is 0
PASS path.pathSegList.getItem(0).pathSegTypeAsLetter is 'M'
PASS path.pathSegList.getItem(0).x is -20
PASS path.pathSegList.getItem(0).y is -20
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 29.98
-PASS path.pathSegList.getItem(0).y is 29.98
+PASS path.pathSegList.getItem(0).x is 30
+PASS path.pathSegList.getItem(0).y is 30
PASS path.pathSegList.getItem(1).pathSegTypeAsLetter is 'l'
-PASS path.pathSegList.getItem(1).x is -59.98
-PASS path.pathSegList.getItem(1).y is -29.98
+PASS path.pathSegList.getItem(1).x is -60
+PASS path.pathSegList.getItem(1).y is -30
PASS path.pathSegList.getItem(2).pathSegTypeAsLetter is 'v'
-PASS path.pathSegList.getItem(2).y is -29.98
+PASS path.pathSegList.getItem(2).y is -30
PASS path.pathSegList.getItem(3).pathSegTypeAsLetter is 'h'
-PASS path.pathSegList.getItem(3).x is 29.98
+PASS path.pathSegList.getItem(3).x is 30
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(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 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(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(2).pathSegTypeAsLetter is 'S'
-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).x is -20
+PASS path.pathSegList.getItem(2).y is 20
+PASS path.pathSegList.getItem(2).x2 is 20
PASS path.pathSegList.getItem(2).y2 is 40
PASS path.pathSegList.getItem(0).pathSegTypeAsLetter is 'M'
PASS path.pathSegList.getItem(0).x is -20
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 -29.98
-PASS path.pathSegList.getItem(0).y is -29.98
+PASS path.pathSegList.getItem(0).x is -30
+PASS path.pathSegList.getItem(0).y is -30
PASS path.pathSegList.getItem(1).pathSegTypeAsLetter is 'L'
-PASS path.pathSegList.getItem(1).x is 29.98
+PASS path.pathSegList.getItem(1).x is 30
PASS path.pathSegList.getItem(1).y is 0
PASS path.pathSegList.getItem(2).pathSegTypeAsLetter is 'V'
-PASS path.pathSegList.getItem(2).y is 29.98
+PASS path.pathSegList.getItem(2).y is 30
PASS path.pathSegList.getItem(3).pathSegTypeAsLetter is 'H'
PASS path.pathSegList.getItem(3).x is 0
PASS path.pathSegList.getItem(0).pathSegTypeAsLetter is 'M'
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS rootSVGElement.getBBox().x is 132
+PASS rootSVGElement.getBBox().x is 131
PASS rootSVGElement.getBBox().y is -90
-PASS rootSVGElement.getBBox().x is 332
+PASS rootSVGElement.getBBox().x is 331
PASS rootSVGElement.getBBox().y is 550
PASS successfullyParsed is true
PASS path.pathSegList.getItem(0).y is 40
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 0
+PASS path.pathSegList.getItem(0).y is 0
PASS path.pathSegList.getItem(0).x is 40
PASS path.pathSegList.getItem(0).y is 40
PASS successfullyParsed is true
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-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 rootSVGElement.getBBox().x is 117
+PASS rootSVGElement.getBBox().y is -160
+PASS rootSVGElement.getBBox().x is 367
+PASS rootSVGElement.getBBox().y is 550
PASS successfullyParsed is true
TEST COMPLETE
}
function shouldBeCloseEnough(_a, _b, tolerance) {
- if (typeof _a != "string" || typeof _b != "string" || typeof tolerance != "number")
+ if (typeof tolerance != "number")
+ tolerance = 0.1 // Default
+ if (typeof _a != "string" || typeof _b != "string")
debug("WARN: shouldBeCloseEnough() expects two string and one number arguments");
var exception;
var _av;
function sample3() {
// Check just before-end conditions
- shouldBeCloseEnough("rect.width.animVal.value", "100", 1);
- shouldBeCloseEnough("rect.width.baseVal.value", "100", 1);
+ shouldBeCloseEnough("rect.width.animVal.value", "100");
+ shouldBeCloseEnough("rect.width.baseVal.value", "100");
}
function executeTest() {
function sample2() {
// Check half-time conditions
- shouldBeCloseEnough("rect.x.animVal.value", "18.8", 0.01);
- shouldBeCloseEnough("rect.x.baseVal.value", "18.8", 0.01);
+ shouldBeCloseEnough("rect.x.animVal.value", "18.8");
+ shouldBeCloseEnough("rect.x.baseVal.value", "18.8");
}
function sample3() {
// Check just before-end conditions
- shouldBeCloseEnough("rect.x.animVal.value", "0.01", 0.01);
- shouldBeCloseEnough("rect.x.baseVal.value", "0.01", 0.01);
+ shouldBeCloseEnough("rect.x.animVal.value", "0");
+ shouldBeCloseEnough("rect.x.baseVal.value", "0");
}
function executeTest() {
function sample2() {
// Check half-time conditions
- shouldBeCloseEnough("rect.x.animVal.value", "18.8", 0.01);
- shouldBeCloseEnough("rect.x.baseVal.value", "18.8", 0.01);
+ shouldBeCloseEnough("rect.x.animVal.value", "18.8");
+ shouldBeCloseEnough("rect.x.baseVal.value", "18.8");
}
function sample3() {
// Check just before-end conditions
- shouldBeCloseEnough("rect.x.animVal.value", "0.01", 0.01);
- shouldBeCloseEnough("rect.x.baseVal.value", "0.01", 0.01);
+ shouldBeCloseEnough("rect.x.animVal.value", "0");
+ shouldBeCloseEnough("rect.x.baseVal.value", "0");
}
function executeTest() {
function sample2() {
// Check half-time conditions
- shouldBeCloseEnough("rect.x.animVal.value", "18.8", 0.01);
- shouldBeCloseEnough("rect.x.baseVal.value", "18.8", 0.01);
+ shouldBeCloseEnough("rect.x.animVal.value", "18.8");
+ shouldBeCloseEnough("rect.x.baseVal.value", "18.8");
}
function sample3() {
// Check just before-end conditions
- shouldBeCloseEnough("rect.x.animVal.value", "0.01", 0.01);
- shouldBeCloseEnough("rect.x.baseVal.value", "0.01", 0.01);
+ shouldBeCloseEnough("rect.x.animVal.value", "0");
+ shouldBeCloseEnough("rect.x.baseVal.value", "0");
}
function executeTest() {
function sample2() {
// Check half-time conditions
- shouldBeCloseEnough("rect.x.animVal.value", "18.8", 0.01);
- shouldBeCloseEnough("rect.x.baseVal.value", "18.8", 0.01);
+ shouldBeCloseEnough("rect.x.animVal.value", "18.8");
+ shouldBeCloseEnough("rect.x.baseVal.value", "18.8");
}
function sample3() {
// Check just before-end conditions
- shouldBeCloseEnough("rect.x.animVal.value", "0.01", 0.01);
- shouldBeCloseEnough("rect.x.baseVal.value", "0.01", 0.01);
+ shouldBeCloseEnough("rect.x.animVal.value", "0");
+ shouldBeCloseEnough("rect.x.baseVal.value", "0");
}
function executeTest() {
function sample2() {
// Check half-time conditions
- shouldBeCloseEnough("rect.x.animVal.value", "18.8", 0.01);
- shouldBeCloseEnough("rect.x.baseVal.value", "18.8", 0.01);
+ shouldBeCloseEnough("rect.x.animVal.value", "18.8");
+ shouldBeCloseEnough("rect.x.baseVal.value", "18.8");
}
function sample3() {
// Check just before-end conditions
- shouldBeCloseEnough("rect.x.animVal.value", "0.01", 0.01);
- shouldBeCloseEnough("rect.x.baseVal.value", "0.01", 0.01);
+ shouldBeCloseEnough("rect.x.animVal.value", "0");
+ shouldBeCloseEnough("rect.x.baseVal.value", "0");
}
function executeTest() {
function executeTest() {
const expectedValues = [
// [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]
+ ["animation", 0.0, sample3],
+ ["animation", 0.001, sample1],
+ ["animation", 1.0, sample1],
+ ["animation", 3.0, sample2],
+ ["animation", 3.999, sample2],
+ ["animation", 4.0, sample3]
];
runAnimationTest(expectedValues);
function executeTest() {
const expectedValues = [
// [animationId, time, sampleCallback]
- ["animation", 0.1, sample1],
+ ["animation", 0.001, sample1],
["animation", 1.5, sample2],
["animation", 3.0, sample3],
];
}
function sample3() {
- shouldBeCloseEnough("rect.x.animVal.value", "200", 0.01);
- shouldBeCloseEnough("rect.x.baseVal.value", "200", 0.01);
+ shouldBeCloseEnough("rect.x.animVal.value", "200");
+ shouldBeCloseEnough("rect.x.baseVal.value", "200");
}
function executeTest() {
rootSVGElement.appendChild(g)
function startSample() {
- shouldBeCloseEnough("rootSVGElement.getBBox().x", "100", 5);
- shouldBeCloseEnough("rootSVGElement.getBBox().y", "250", 5);
+ shouldBeCloseEnough("rootSVGElement.getBBox().x", "100", 1);
+ shouldBeCloseEnough("rootSVGElement.getBBox().y", "250", 1);
}
function endSample() {
- shouldBeCloseEnough("rootSVGElement.getBBox().x", "400", 5);
- shouldBeCloseEnough("rootSVGElement.getBBox().y", "250", 5);
+ shouldBeCloseEnough("rootSVGElement.getBBox().x", "400", 1);
+ shouldBeCloseEnough("rootSVGElement.getBBox().y", "250", 1);
}
function executeTest() {
const expectedValues = [
- ["animation", 0.01, startSample],
- ["animation", 3.99, endSample]
+ ["animation", 0.001, startSample],
+ ["animation", 3.999, endSample]
];
runAnimationTest(expectedValues);
function sample2() {
shouldBe("path.pathSegList.getItem(0).pathSegTypeAsLetter", "'M'");
- shouldBeCloseEnough("path.pathSegList.getItem(0).x", "-20", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(0).y", "-20", 0.01);
+ shouldBe("path.pathSegList.getItem(0).x", "-20");
+ shouldBe("path.pathSegList.getItem(0).y", "-20");
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", "10", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y1", "-10", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).x2", "10", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y2", "-10", 0.01);
+ shouldBe("path.pathSegList.getItem(1).x", "20");
+ shouldBe("path.pathSegList.getItem(1).y", "20");
+ shouldBe("path.pathSegList.getItem(1).x1", "10");
+ shouldBe("path.pathSegList.getItem(1).y1", "-10");
+ shouldBe("path.pathSegList.getItem(1).x2", "10");
+ shouldBe("path.pathSegList.getItem(1).y2", "-10");
shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'S'");
- shouldBeCloseEnough("path.pathSegList.getItem(2).x", "-10", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(2).y", "10", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(2).x2", "30", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(2).y2", "35", 0.01);
+ shouldBe("path.pathSegList.getItem(2).x", "-10");
+ shouldBe("path.pathSegList.getItem(2).y", "10");
+ shouldBe("path.pathSegList.getItem(2).x2", "30");
+ shouldBe("path.pathSegList.getItem(2).y2", "35");
}
function sample3() {
shouldBe("path.pathSegList.getItem(0).pathSegTypeAsLetter", "'M'");
- shouldBeCloseEnough("path.pathSegList.getItem(0).x", "-20", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(0).y", "-20", 0.01);
+ shouldBe("path.pathSegList.getItem(0).x", "-20");
+ shouldBe("path.pathSegList.getItem(0).y", "-20");
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", "10", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y1", "30", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).x2", "10", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y2", "30", 0.01);
+ shouldBe("path.pathSegList.getItem(1).x", "40");
+ shouldBe("path.pathSegList.getItem(1).y", "40");
+ shouldBe("path.pathSegList.getItem(1).x1", "10");
+ shouldBe("path.pathSegList.getItem(1).y1", "30");
+ shouldBe("path.pathSegList.getItem(1).x2", "10");
+ shouldBe("path.pathSegList.getItem(1).y2", "30");
shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'s'");
- shouldBeCloseEnough("path.pathSegList.getItem(2).x", "-10", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(2).y", "-30", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(2).x2", "30", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(2).y2", "5", 0.01);
+ shouldBe("path.pathSegList.getItem(2).x", "-10");
+ shouldBe("path.pathSegList.getItem(2).y", "-30");
+ shouldBe("path.pathSegList.getItem(2).x2", "30");
+ shouldBe("path.pathSegList.getItem(2).y2", "5");
}
function sample4() {
shouldBe("path.pathSegList.getItem(0).pathSegTypeAsLetter", "'M'");
- shouldBeCloseEnough("path.pathSegList.getItem(0).x", "-20", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(0).y", "-20", 0.01);
+ shouldBeCloseEnough("path.pathSegList.getItem(0).x", "-20");
+ shouldBeCloseEnough("path.pathSegList.getItem(0).y", "-20");
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.01", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y1", "40", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).x2", "0.01", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y2", "40", 0.01);
+ shouldBeCloseEnough("path.pathSegList.getItem(1).x", "40");
+ shouldBeCloseEnough("path.pathSegList.getItem(1).y", "40");
+ shouldBeCloseEnough("path.pathSegList.getItem(1).x1", "0");
+ shouldBeCloseEnough("path.pathSegList.getItem(1).y1", "40");
+ shouldBeCloseEnough("path.pathSegList.getItem(1).x2", "0");
+ shouldBeCloseEnough("path.pathSegList.getItem(1).y2", "40");
shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'s'");
- 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.01", 0.01);
+ shouldBeCloseEnough("path.pathSegList.getItem(2).x", "-0");
+ shouldBeCloseEnough("path.pathSegList.getItem(2).y", "-40");
+ shouldBeCloseEnough("path.pathSegList.getItem(2).x2", "40");
+ shouldBeCloseEnough("path.pathSegList.getItem(2).y2", "0");
}
function executeTest() {
function sample2() {
shouldBe("path.pathSegList.getItem(0).pathSegTypeAsLetter", "'M'");
- shouldBeCloseEnough("path.pathSegList.getItem(0).x", "-15", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(0).y", "-15", 0.01);
+ shouldBe("path.pathSegList.getItem(0).x", "-15");
+ shouldBe("path.pathSegList.getItem(0).y", "-15");
shouldBe("path.pathSegList.getItem(1).pathSegTypeAsLetter", "'L'");
- shouldBeCloseEnough("path.pathSegList.getItem(1).x", "15", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y", "0", 0.01);
+ shouldBe("path.pathSegList.getItem(1).x", "15");
+ shouldBe("path.pathSegList.getItem(1).y", "0");
shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'V'");
- shouldBeCloseEnough("path.pathSegList.getItem(2).y", "15", 0.01);
+ shouldBe("path.pathSegList.getItem(2).y", "15");
shouldBe("path.pathSegList.getItem(3).pathSegTypeAsLetter", "'H'");
- shouldBeCloseEnough("path.pathSegList.getItem(3).x", "0", 0.01);
+ shouldBe("path.pathSegList.getItem(3).x", "0");
}
function sample3() {
shouldBe("path.pathSegList.getItem(0).pathSegTypeAsLetter", "'M'");
- shouldBeCloseEnough("path.pathSegList.getItem(0).x", "15", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(0).y", "15", 0.01);
+ shouldBe("path.pathSegList.getItem(0).x", "15");
+ shouldBe("path.pathSegList.getItem(0).y", "15");
shouldBe("path.pathSegList.getItem(1).pathSegTypeAsLetter", "'l'");
- shouldBeCloseEnough("path.pathSegList.getItem(1).x", "-30", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y", "-15", 0.01);
+ shouldBe("path.pathSegList.getItem(1).x", "-30");
+ shouldBe("path.pathSegList.getItem(1).y", "-15");
shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'v'");
- shouldBeCloseEnough("path.pathSegList.getItem(2).y", "-15", 0.01);
+ shouldBe("path.pathSegList.getItem(2).y", "-15");
shouldBe("path.pathSegList.getItem(3).pathSegTypeAsLetter", "'h'");
- shouldBeCloseEnough("path.pathSegList.getItem(3).x", "15", 0.01);
+ shouldBe("path.pathSegList.getItem(3).x", "15");
}
function sample4() {
shouldBe("path.pathSegList.getItem(0).pathSegTypeAsLetter", "'M'");
- shouldBeCloseEnough("path.pathSegList.getItem(0).x", "29.98", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(0).y", "29.98", 0.01);
+ shouldBeCloseEnough("path.pathSegList.getItem(0).x", "30");
+ shouldBeCloseEnough("path.pathSegList.getItem(0).y", "30");
shouldBe("path.pathSegList.getItem(1).pathSegTypeAsLetter", "'l'");
- shouldBeCloseEnough("path.pathSegList.getItem(1).x", "-59.98", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y", "-29.98", 0.01);
+ shouldBeCloseEnough("path.pathSegList.getItem(1).x", "-60");
+ shouldBeCloseEnough("path.pathSegList.getItem(1).y", "-30");
shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'v'");
- shouldBeCloseEnough("path.pathSegList.getItem(2).y", "-29.98", 0.01);
+ shouldBeCloseEnough("path.pathSegList.getItem(2).y", "-30");
shouldBe("path.pathSegList.getItem(3).pathSegTypeAsLetter", "'h'");
- shouldBeCloseEnough("path.pathSegList.getItem(3).x", "29.98", 0.01);
+ shouldBeCloseEnough("path.pathSegList.getItem(3).x", "30");
}
function executeTest() {
function sample2() {
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);
+ shouldBe("path.pathSegList.getItem(0).x", "-30");
+ shouldBe("path.pathSegList.getItem(0).y", "-30");
shouldBe("path.pathSegList.getItem(1).pathSegTypeAsLetter", "'Q'");
- shouldBeCloseEnough("path.pathSegList.getItem(1).x", "22.5", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y", "0", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).x1", "22.5", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y1", "-30", 0.01);
+ shouldBe("path.pathSegList.getItem(1).x", "22.5");
+ shouldBe("path.pathSegList.getItem(1).y", "0");
+ shouldBe("path.pathSegList.getItem(1).x1", "22.5");
+ shouldBe("path.pathSegList.getItem(1).y1", "-30");
shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'T'");
- shouldBeCloseEnough("path.pathSegList.getItem(2).x", "-30", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(2).y", "30", 0.01);
+ shouldBe("path.pathSegList.getItem(2).x", "-30");
+ shouldBe("path.pathSegList.getItem(2).y", "30");
}
function sample3() {
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);
+ shouldBe("path.pathSegList.getItem(0).x", "-30");
+ shouldBe("path.pathSegList.getItem(0).y", "-30");
shouldBe("path.pathSegList.getItem(1).pathSegTypeAsLetter", "'q'");
- shouldBeCloseEnough("path.pathSegList.getItem(1).x", "37.5", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y", "30", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).x1", "37.5", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y1", "0", 0.01);
+ shouldBe("path.pathSegList.getItem(1).x", "37.5");
+ shouldBe("path.pathSegList.getItem(1).y", "30");
+ shouldBe("path.pathSegList.getItem(1).x1", "37.5");
+ shouldBe("path.pathSegList.getItem(1).y1", "0");
shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'t'");
- shouldBeCloseEnough("path.pathSegList.getItem(2).x", "-37.5", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(2).y", "30", 0.01);
+ shouldBe("path.pathSegList.getItem(2).x", "-37.5");
+ shouldBe("path.pathSegList.getItem(2).y", "30");
}
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", "-30");
+ shouldBeCloseEnough("path.pathSegList.getItem(0).y", "-30");
shouldBe("path.pathSegList.getItem(1).pathSegTypeAsLetter", "'q'");
- shouldBeCloseEnough("path.pathSegList.getItem(1).x", "30", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y", "30", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).x1", "30", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y1", "0", 0.01);
+ shouldBeCloseEnough("path.pathSegList.getItem(1).x", "30");
+ shouldBeCloseEnough("path.pathSegList.getItem(1).y", "30");
+ shouldBeCloseEnough("path.pathSegList.getItem(1).x1", "30");
+ shouldBeCloseEnough("path.pathSegList.getItem(1).y1", "0");
shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'t'");
- shouldBeCloseEnough("path.pathSegList.getItem(2).x", "-30", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(2).y", "30", 0.01);
+ shouldBeCloseEnough("path.pathSegList.getItem(2).x", "-30");
+ shouldBeCloseEnough("path.pathSegList.getItem(2).y", "30");
}
function executeTest() {
function sample2() {
shouldBe("path.pathSegList.getItem(0).pathSegTypeAsLetter", "'M'");
- shouldBeCloseEnough("path.pathSegList.getItem(0).x", "-20", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(0).y", "-20", 0.01);
+ shouldBe("path.pathSegList.getItem(0).x", "-20");
+ shouldBe("path.pathSegList.getItem(0).y", "-20");
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", "10", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y1", "30", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).x2", "10", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y2", "30", 0.01);
+ shouldBe("path.pathSegList.getItem(1).x", "40");
+ shouldBe("path.pathSegList.getItem(1).y", "40");
+ shouldBe("path.pathSegList.getItem(1).x1", "10");
+ shouldBe("path.pathSegList.getItem(1).y1", "30");
+ shouldBe("path.pathSegList.getItem(1).x2", "10");
+ shouldBe("path.pathSegList.getItem(1).y2", "30");
shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'s'");
- shouldBeCloseEnough("path.pathSegList.getItem(2).x", "-10", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(2).y", "-30", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(2).x2", "30", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(2).y2", "5", 0.01);
+ shouldBe("path.pathSegList.getItem(2).x", "-10");
+ shouldBe("path.pathSegList.getItem(2).y", "-30");
+ shouldBe("path.pathSegList.getItem(2).x2", "30");
+ shouldBe("path.pathSegList.getItem(2).y2", "5");
}
function sample3() {
shouldBe("path.pathSegList.getItem(0).pathSegTypeAsLetter", "'M'");
- shouldBeCloseEnough("path.pathSegList.getItem(0).x", "-20", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(0).y", "-20", 0.01);
+ shouldBe("path.pathSegList.getItem(0).x", "-20");
+ shouldBe("path.pathSegList.getItem(0).y", "-20");
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", "10", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y1", "-10", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).x2", "10", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y2", "-10", 0.01);
+ shouldBe("path.pathSegList.getItem(1).x", "20");
+ shouldBe("path.pathSegList.getItem(1).y", "20");
+ shouldBe("path.pathSegList.getItem(1).x1", "10");
+ shouldBe("path.pathSegList.getItem(1).y1", "-10");
+ shouldBe("path.pathSegList.getItem(1).x2", "10");
+ shouldBe("path.pathSegList.getItem(1).y2", "-10");
shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'S'");
- shouldBeCloseEnough("path.pathSegList.getItem(2).x", "-10", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(2).y", "10", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(2).x2", "30", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(2).y2", "35", 0.01);
+ shouldBe("path.pathSegList.getItem(2).x", "-10");
+ shouldBe("path.pathSegList.getItem(2).y", "10");
+ shouldBe("path.pathSegList.getItem(2).x2", "30");
+ shouldBe("path.pathSegList.getItem(2).y2", "35");
}
function sample4() {
shouldBe("path.pathSegList.getItem(0).pathSegTypeAsLetter", "'M'");
- shouldBeCloseEnough("path.pathSegList.getItem(0).x", "-20", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(0).y", "-20", 0.01);
+ shouldBeCloseEnough("path.pathSegList.getItem(0).x", "-20");
+ shouldBeCloseEnough("path.pathSegList.getItem(0).y", "-20");
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", "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);
+ shouldBeCloseEnough("path.pathSegList.getItem(1).x", "20");
+ shouldBeCloseEnough("path.pathSegList.getItem(1).y", "20");
+ shouldBeCloseEnough("path.pathSegList.getItem(1).x1", "20");
+ shouldBeCloseEnough("path.pathSegList.getItem(1).y1", "-20");
+ shouldBeCloseEnough("path.pathSegList.getItem(1).x2", "20");
+ shouldBeCloseEnough("path.pathSegList.getItem(1).y2", "-20");
shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'S'");
- 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);
+ shouldBeCloseEnough("path.pathSegList.getItem(2).x", "-20");
+ shouldBeCloseEnough("path.pathSegList.getItem(2).y", "20");
+ shouldBeCloseEnough("path.pathSegList.getItem(2).x2", "20");
+ shouldBeCloseEnough("path.pathSegList.getItem(2).y2", "40");
}
function executeTest() {
function sample2() {
shouldBe("path.pathSegList.getItem(0).pathSegTypeAsLetter", "'M'");
- shouldBeCloseEnough("path.pathSegList.getItem(0).x", "15", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(0).y", "15", 0.01);
+ shouldBe("path.pathSegList.getItem(0).x", "15");
+ shouldBe("path.pathSegList.getItem(0).y", "15");
shouldBe("path.pathSegList.getItem(1).pathSegTypeAsLetter", "'l'");
- shouldBeCloseEnough("path.pathSegList.getItem(1).x", "-30", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y", "-15", 0.01);
+ shouldBe("path.pathSegList.getItem(1).x", "-30");
+ shouldBe("path.pathSegList.getItem(1).y", "-15");
shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'v'");
- shouldBeCloseEnough("path.pathSegList.getItem(2).y", "-15", 0.01);
+ shouldBe("path.pathSegList.getItem(2).y", "-15");
shouldBe("path.pathSegList.getItem(3).pathSegTypeAsLetter", "'h'");
- shouldBeCloseEnough("path.pathSegList.getItem(3).x", "15", 0.01);
+ shouldBe("path.pathSegList.getItem(3).x", "15");
}
function sample3() {
shouldBe("path.pathSegList.getItem(0).pathSegTypeAsLetter", "'M'");
- shouldBeCloseEnough("path.pathSegList.getItem(0).x", "-15", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(0).y", "-15", 0.01);
+ shouldBe("path.pathSegList.getItem(0).x", "-15");
+ shouldBe("path.pathSegList.getItem(0).y", "-15");
shouldBe("path.pathSegList.getItem(1).pathSegTypeAsLetter", "'L'");
- shouldBeCloseEnough("path.pathSegList.getItem(1).x", "15", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y", "0", 0.01);
+ shouldBe("path.pathSegList.getItem(1).x", "15");
+ shouldBe("path.pathSegList.getItem(1).y", "0");
shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'V'");
- shouldBeCloseEnough("path.pathSegList.getItem(2).y", "15", 0.01);
+ shouldBe("path.pathSegList.getItem(2).y", "15");
shouldBe("path.pathSegList.getItem(3).pathSegTypeAsLetter", "'H'");
- shouldBeCloseEnough("path.pathSegList.getItem(3).x", "0", 0.01);
+ shouldBe("path.pathSegList.getItem(3).x", "0");
}
function sample4() {
shouldBe("path.pathSegList.getItem(0).pathSegTypeAsLetter", "'M'");
- shouldBeCloseEnough("path.pathSegList.getItem(0).x", "-29.98", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(0).y", "-29.98", 0.01);
+ shouldBeCloseEnough("path.pathSegList.getItem(0).x", "-30");
+ shouldBeCloseEnough("path.pathSegList.getItem(0).y", "-30");
shouldBe("path.pathSegList.getItem(1).pathSegTypeAsLetter", "'L'");
- shouldBeCloseEnough("path.pathSegList.getItem(1).x", "29.98", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y", "0", 0.01);
+ shouldBeCloseEnough("path.pathSegList.getItem(1).x", "30");
+ shouldBeCloseEnough("path.pathSegList.getItem(1).y", "0");
shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'V'");
- shouldBeCloseEnough("path.pathSegList.getItem(2).y", "29.98", 0.01);
+ shouldBeCloseEnough("path.pathSegList.getItem(2).y", "30");
shouldBe("path.pathSegList.getItem(3).pathSegTypeAsLetter", "'H'");
- shouldBeCloseEnough("path.pathSegList.getItem(3).x", "0", 0.01);
+ shouldBeCloseEnough("path.pathSegList.getItem(3).x", "0");
}
function executeTest() {
function sample2() {
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);
+ shouldBe("path.pathSegList.getItem(0).x", "-30");
+ shouldBe("path.pathSegList.getItem(0).y", "-30");
shouldBe("path.pathSegList.getItem(1).pathSegTypeAsLetter", "'q'");
- shouldBeCloseEnough("path.pathSegList.getItem(1).x", "37.5", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y", "30", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).x1", "37.5", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y1", "0", 0.01);
+ shouldBe("path.pathSegList.getItem(1).x", "37.5");
+ shouldBe("path.pathSegList.getItem(1).y", "30");
+ shouldBe("path.pathSegList.getItem(1).x1", "37.5");
+ shouldBe("path.pathSegList.getItem(1).y1", "0");
shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'t'");
- shouldBeCloseEnough("path.pathSegList.getItem(2).x", "-37.5", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(2).y", "30", 0.01);
+ shouldBe("path.pathSegList.getItem(2).x", "-37.5");
+ shouldBe("path.pathSegList.getItem(2).y", "30");
}
function sample3() {
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);
+ shouldBe("path.pathSegList.getItem(0).x", "-30");
+ shouldBe("path.pathSegList.getItem(0).y", "-30");
shouldBe("path.pathSegList.getItem(1).pathSegTypeAsLetter", "'Q'");
- shouldBeCloseEnough("path.pathSegList.getItem(1).x", "22.5", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y", "0", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).x1", "22.5", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y1", "-30", 0.01);
+ shouldBe("path.pathSegList.getItem(1).x", "22.5");
+ shouldBe("path.pathSegList.getItem(1).y", "0");
+ shouldBe("path.pathSegList.getItem(1).x1", "22.5");
+ shouldBe("path.pathSegList.getItem(1).y1", "-30");
shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'T'");
- shouldBeCloseEnough("path.pathSegList.getItem(2).x", "-30", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(2).y", "30", 0.01);
+ shouldBe("path.pathSegList.getItem(2).x", "-30");
+ shouldBe("path.pathSegList.getItem(2).y", "30");
}
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", "-30");
+ shouldBeCloseEnough("path.pathSegList.getItem(0).y", "-30");
shouldBe("path.pathSegList.getItem(1).pathSegTypeAsLetter", "'Q'");
- shouldBeCloseEnough("path.pathSegList.getItem(1).x", "30", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y", "0", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).x1", "30", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(1).y1", "-30", 0.01);
+ shouldBeCloseEnough("path.pathSegList.getItem(1).x", "30");
+ shouldBeCloseEnough("path.pathSegList.getItem(1).y", "0");
+ shouldBeCloseEnough("path.pathSegList.getItem(1).x1", "30");
+ shouldBeCloseEnough("path.pathSegList.getItem(1).y1", "-30");
shouldBe("path.pathSegList.getItem(2).pathSegTypeAsLetter", "'T'");
- shouldBeCloseEnough("path.pathSegList.getItem(2).x", "-30", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(2).y", "30", 0.01);
+ shouldBeCloseEnough("path.pathSegList.getItem(2).x", "-30");
+ shouldBeCloseEnough("path.pathSegList.getItem(2).y", "30");
}
function executeTest() {
var animateMotion = createSVGElement("animateMotion")
animateMotion.setAttribute("id", "animation")
-animateMotion.setAttribute("dur", "4s")
+animateMotion.setAttribute("dur", "40s")
animateMotion.setAttribute("repeatCount", "1")
animateMotion.setAttribute("rotate", "auto")
animateMotion.setAttribute("path", "M 100,250 C 100,50 400,50 400,250")
rootSVGElement.appendChild(g)
function startSample() {
- shouldBeCloseEnough("rootSVGElement.getBBox().x", "132", 5);
- shouldBeCloseEnough("rootSVGElement.getBBox().y", "-90", 5);
+ shouldBeCloseEnough("rootSVGElement.getBBox().x", "131", 1);
+ shouldBeCloseEnough("rootSVGElement.getBBox().y", "-90", 1);
}
function endSample() {
- shouldBeCloseEnough("rootSVGElement.getBBox().x", "332", 5);
- shouldBeCloseEnough("rootSVGElement.getBBox().y", "550", 5);
+ shouldBeCloseEnough("rootSVGElement.getBBox().x", "331", 1);
+ shouldBeCloseEnough("rootSVGElement.getBBox().y", "550", 1);
}
function executeTest() {
const expectedValues = [
- ["animation", 0.01, startSample],
- ["animation", 3.99, endSample]
+ ["animation", 0.001, startSample],
+ ["animation", 39.999, endSample]
];
runAnimationTest(expectedValues);
}
function sample2() {
- shouldBeCloseEnough("path.pathSegList.getItem(0).x", "20", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(0).y", "20", 0.01);
+ shouldBe("path.pathSegList.getItem(0).x", "20");
+ shouldBe("path.pathSegList.getItem(0).y", "20");
}
function sample3() {
- shouldBeCloseEnough("path.pathSegList.getItem(0).x", "0.01", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(0).y", "0.01", 0.01);
+ shouldBeCloseEnough("path.pathSegList.getItem(0).x", "0");
+ shouldBeCloseEnough("path.pathSegList.getItem(0).y", "0");
}
function executeTest() {
var animateMotion = createSVGElement("animateMotion")
animateMotion.setAttribute("id", "animation")
-animateMotion.setAttribute("dur", "4s")
+animateMotion.setAttribute("dur", "40s")
animateMotion.setAttribute("repeatCount", "1")
animateMotion.setAttribute("rotate", "auto")
animateMotion.setAttribute("path", "M 100,250 C 100,50 400,50 400,250")
rootSVGElement.appendChild(text)
function startSample() {
- shouldBeCloseEnough("rootSVGElement.getBBox().x", "118.65", 0.01);
- shouldBeCloseEnough("rootSVGElement.getBBox().y", "-161.03", 0.01);
+ shouldBeCloseEnough("rootSVGElement.getBBox().x", "117", 1);
+ shouldBeCloseEnough("rootSVGElement.getBBox().y", "-160", 1);
}
function endSample() {
- shouldBeCloseEnough("rootSVGElement.getBBox().x", "366.89", 1);
- shouldBeCloseEnough("rootSVGElement.getBBox().y", "549.93", 1);
+ shouldBeCloseEnough("rootSVGElement.getBBox().x", "367", 1);
+ shouldBeCloseEnough("rootSVGElement.getBBox().y", "550", 1);
}
function executeTest() {
const expectedValues = [
- ["animation", 0.01, startSample],
- ["animation", 3.999, endSample]
+ ["animation", 0.001, startSample],
+ ["animation", 39.999, endSample]
];
runAnimationTest(expectedValues);
}
function sample3() {
- shouldBeCloseEnough("pattern.patternTransform.animVal.getItem(0).matrix.a", "2", 0.01);
- shouldBeCloseEnough("pattern.patternTransform.baseVal.getItem(0).matrix.a", "2", 0.01);
+ shouldBeCloseEnough("pattern.patternTransform.animVal.getItem(0).matrix.a", "2");
+ shouldBeCloseEnough("pattern.patternTransform.baseVal.getItem(0).matrix.a", "2");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("marker.orientAngle.animVal.value", "90", 0.01);
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90", 0.01);
+ shouldBe("marker.orientAngle.animVal.value", "90");
+ shouldBe("marker.orientAngle.baseVal.value", "90");
}
function sample3() {
- shouldBeCloseEnough("marker.orientAngle.animVal.value", "179.96", 0.01);
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "179.96", 0.01);
+ shouldBeCloseEnough("marker.orientAngle.animVal.value", "180");
+ shouldBeCloseEnough("marker.orientAngle.baseVal.value", "180");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("marker.orientAngle.animVal.value", "90", 0.01);
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90", 0.01);
+ shouldBe("marker.orientAngle.animVal.value", "90");
+ shouldBe("marker.orientAngle.baseVal.value", "90");
}
function sample3() {
- shouldBeCloseEnough("marker.orientAngle.animVal.value", "179.96", 0.01);
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "179.96", 0.01);
+ shouldBeCloseEnough("marker.orientAngle.animVal.value", "180");
+ shouldBeCloseEnough("marker.orientAngle.baseVal.value", "180");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("marker.orientAngle.animVal.value", "90", 0.01);
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90", 0.01);
+ shouldBe("marker.orientAngle.animVal.value", "90");
+ shouldBe("marker.orientAngle.baseVal.value", "90");
}
function sample3() {
- shouldBeCloseEnough("marker.orientAngle.animVal.value", "179.96", 0.01);
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "179.96", 0.01);
+ shouldBeCloseEnough("marker.orientAngle.animVal.value", "180");
+ shouldBeCloseEnough("marker.orientAngle.baseVal.value", "180");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("marker.orientAngle.animVal.value", "90", 0.01);
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90", 0.01);
+ shouldBe("marker.orientAngle.animVal.value", "90");
+ shouldBe("marker.orientAngle.baseVal.value", "90");
}
function sample3() {
- shouldBeCloseEnough("marker.orientAngle.animVal.value", "179.96", 0.01);
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "179.96", 0.01);
+ shouldBeCloseEnough("marker.orientAngle.animVal.value", "180");
+ shouldBeCloseEnough("marker.orientAngle.baseVal.value", "180");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("marker.orientAngle.animVal.value", "90", 0.01);
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90", 0.01);
+ shouldBe("marker.orientAngle.animVal.value", "90");
+ shouldBe("marker.orientAngle.baseVal.value", "90");
}
function sample3() {
- shouldBeCloseEnough("marker.orientAngle.animVal.value", "179.96", 0.01);
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "179.96", 0.01);
+ shouldBeCloseEnough("marker.orientAngle.animVal.value", "180");
+ shouldBeCloseEnough("marker.orientAngle.baseVal.value", "180");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("marker.orientAngle.animVal.value", "90", 0.01);
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "90", 0.01);
+ shouldBe("marker.orientAngle.animVal.value", "90");
+ shouldBe("marker.orientAngle.baseVal.value", "90");
}
function sample3() {
- shouldBeCloseEnough("marker.orientAngle.animVal.value", "179.96", 0.01);
- shouldBeCloseEnough("marker.orientAngle.baseVal.value", "179.96", 0.01);
+ shouldBeCloseEnough("marker.orientAngle.animVal.value", "180");
+ shouldBeCloseEnough("marker.orientAngle.baseVal.value", "180");
}
function executeTest() {
}
function sample3() {
- shouldBe("feConvolveMatrix.targetX.animVal", "2");
+ shouldBeCloseEnough("feConvolveMatrix.targetX.animVal", "2");
// shouldBe("feConvolveMatrix.targetX.baseVal", "0");
}
}
function sample2() {
- shouldBeCloseEnough("rect.height.animVal.value", "150", 0.01);
- shouldBeCloseEnough("rect.height.baseVal.value", "150", 0.01);
+ shouldBe("rect.height.animVal.value", "150");
+ shouldBe("rect.height.baseVal.value", "150");
}
function sample3() {
- shouldBeCloseEnough("rect.height.animVal.value", "199.98", 0.01);
- shouldBeCloseEnough("rect.height.baseVal.value", "199.98", 0.01);
+ shouldBeCloseEnough("rect.height.animVal.value", "200");
+ shouldBeCloseEnough("rect.height.baseVal.value", "200");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("circle.r.animVal.value", "132.475", 0.01);
- shouldBeCloseEnough("circle.r.baseVal.value", "132.475", 0.01);
+ shouldBeCloseEnough("circle.r.animVal.value", "132.5");
+ shouldBeCloseEnough("circle.r.baseVal.value", "132.5");
}
function sample3() {
- shouldBeCloseEnough("circle.r.animVal.value", "254.89", 0.01);
- shouldBeCloseEnough("circle.r.baseVal.value", "254.89", 0.01);
+ shouldBeCloseEnough("circle.r.animVal.value", "254.9");
+ shouldBeCloseEnough("circle.r.baseVal.value", "254.9");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("rect.width.animVal.value", "200", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "200", 0.01);
+ shouldBeCloseEnough("rect.width.animVal.value", "200");
+ shouldBeCloseEnough("rect.width.baseVal.value", "200");
}
function sample3() {
- shouldBeCloseEnough("rect.width.animVal.value", "299.96", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "299.96", 0.01);
+ shouldBeCloseEnough("rect.width.animVal.value", "300");
+ shouldBeCloseEnough("rect.width.baseVal.value", "300");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("rect.width.animVal.value", "150", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "150", 0.01);
+ shouldBe("rect.width.animVal.value", "150");
+ shouldBe("rect.width.baseVal.value", "150");
}
function sample3() {
- shouldBeCloseEnough("rect.width.animVal.value", "199.98", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "199.98", 0.01);
+ shouldBeCloseEnough("rect.width.animVal.value", "200");
+ shouldBeCloseEnough("rect.width.baseVal.value", "200");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("rect.width.animVal.value", "144.49", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "144.49", 0.01);
+ shouldBeCloseEnough("rect.width.animVal.value", "144.5");
+ shouldBeCloseEnough("rect.width.baseVal.value", "144.5");
}
function sample3() {
- shouldBeCloseEnough("rect.width.animVal.value", "188.96", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "188.96", 0.01);
+ shouldBeCloseEnough("rect.width.animVal.value", "189");
+ shouldBeCloseEnough("rect.width.baseVal.value", "189");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("rect.width.animVal.value", "150", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "150", 0.01);
+ shouldBe("rect.width.animVal.value", "150");
+ shouldBe("rect.width.baseVal.value", "150");
}
function sample3() {
- shouldBeCloseEnough("rect.width.animVal.value", "199.98", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "199.98", 0.01);
+ shouldBeCloseEnough("rect.width.animVal.value", "200");
+ shouldBeCloseEnough("rect.width.baseVal.value", "200");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("rect.width.animVal.value", "150", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "150", 0.01);
+ shouldBe("rect.width.animVal.value", "150");
+ shouldBe("rect.width.baseVal.value", "150");
}
function sample3() {
- shouldBeCloseEnough("rect.width.animVal.value", "199.98", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "199.98", 0.01);
+ shouldBeCloseEnough("rect.width.animVal.value", "200");
+ shouldBeCloseEnough("rect.width.baseVal.value", "200");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("rect.width.animVal.value", "170", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "170", 0.01);
+ shouldBeCloseEnough("rect.width.animVal.value", "170");
+ shouldBeCloseEnough("rect.width.baseVal.value", "170");
}
function sample3() {
- shouldBeCloseEnough("rect.width.animVal.value", "239.96", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "239.96", 0.01);
+ shouldBeCloseEnough("rect.width.animVal.value", "240");
+ shouldBeCloseEnough("rect.width.baseVal.value", "240");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("rect.width.animVal.value", "150", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "150", 0.01);
+ shouldBe("rect.width.animVal.value", "150");
+ shouldBe("rect.width.baseVal.value", "150");
}
function sample3() {
- shouldBeCloseEnough("rect.width.animVal.value", "199.98", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "199.98", 0.01);
+ shouldBeCloseEnough("rect.width.animVal.value", "200");
+ shouldBeCloseEnough("rect.width.baseVal.value", "200");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("rect.width.animVal.value", "170", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "170", 0.01);
+ shouldBe("rect.width.animVal.value", "170");
+ shouldBe("rect.width.baseVal.value", "170");
}
function sample3() {
- shouldBeCloseEnough("rect.width.animVal.value", "239.96", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "239.96", 0.01);
+ shouldBeCloseEnough("rect.width.animVal.value", "240");
+ shouldBeCloseEnough("rect.width.baseVal.value", "240");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("rect.width.animVal.value", "350", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "350", 0.01);
+ shouldBeCloseEnough("rect.width.animVal.value", "350");
+ shouldBeCloseEnough("rect.width.baseVal.value", "350");
}
function sample3() {
- shouldBeCloseEnough("rect.width.animVal.value", "599.88", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "599.88", 0.01);
+ shouldBeCloseEnough("rect.width.animVal.value", "600", 1);
+ shouldBeCloseEnough("rect.width.baseVal.value", "600", 1);
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("rect.width.animVal.value", "161.15", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "161.15", 0.01);
+ shouldBeCloseEnough("rect.width.animVal.value", "161.2");
+ shouldBeCloseEnough("rect.width.baseVal.value", "161.2");
}
function sample3() {
- shouldBeCloseEnough("rect.width.animVal.value", "188.96", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "188.96", 0.01);
+ shouldBeCloseEnough("rect.width.animVal.value", "189");
+ shouldBeCloseEnough("rect.width.baseVal.value", "189");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("rect.width.animVal.value", "150", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "150", 0.01);
+ shouldBe("rect.width.animVal.value", "150");
+ shouldBe("rect.width.baseVal.value", "150");
}
function sample3() {
- shouldBeCloseEnough("rect.width.animVal.value", "199.98", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "199.98", 0.01);
+ shouldBeCloseEnough("rect.width.animVal.value", "200");
+ shouldBeCloseEnough("rect.width.baseVal.value", "200");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("rect.width.animVal.value", "130", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "130", 0.01);
+ shouldBe("rect.width.animVal.value", "130");
+ shouldBe("rect.width.baseVal.value", "130");
}
function sample3() {
- shouldBeCloseEnough("rect.width.animVal.value", "151.18", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "151.18", 0.01);
+ shouldBeCloseEnough("rect.width.animVal.value", "151.2");
+ shouldBeCloseEnough("rect.width.baseVal.value", "151.2");
}
function sample4() {
- shouldBeCloseEnough("rect.width.animVal.value", "576", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "576", 0.01);
+ shouldBe("rect.width.animVal.value", "576");
+ shouldBe("rect.width.baseVal.value", "576");
}
function sample5() {
- shouldBeCloseEnough("rect.width.animVal.value", "266.98", 0.01);
- shouldBeCloseEnough("rect.width.baseVal.value", "266.98", 0.01);
+ shouldBeCloseEnough("rect.width.animVal.value", "267");
+ shouldBeCloseEnough("rect.width.baseVal.value", "267");
}
function executeTest() {
}
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");
+ shouldBeCloseEnough("text.x.animVal.getItem(1).value", "90");
+ shouldBeCloseEnough("text.x.animVal.getItem(2).value", "120");
+ shouldBeCloseEnough("text.x.animVal.getItem(3).value", "150");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("text.x.animVal.getItem(0).value", "81.7", 0.01);
- shouldBeCloseEnough("text.x.animVal.getItem(1).value", "75", 0.01);
- shouldBeCloseEnough("text.x.animVal.getItem(2).value", "144.49", 0.01);
- shouldBeCloseEnough("text.x.animVal.getItem(3).value", "197.33", 0.01);
+ shouldBeCloseEnough("text.x.animVal.getItem(0).value", "81.7");
+ shouldBeCloseEnough("text.x.animVal.getItem(1).value", "75");
+ shouldBeCloseEnough("text.x.animVal.getItem(2).value", "144.5");
+ shouldBeCloseEnough("text.x.animVal.getItem(3).value", "197.3");
}
function sample3() {
- 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.02", 0.01);
- shouldBeCloseEnough("text.x.animVal.getItem(3).value", "383.91", 0.01);
+ shouldBeCloseEnough("text.x.animVal.getItem(0).value", "113.4");
+ shouldBeCloseEnough("text.x.animVal.getItem(1).value", "80");
+ shouldBeCloseEnough("text.x.animVal.getItem(2).value", "100");
+ shouldBeCloseEnough("text.x.animVal.getItem(3).value", "384");
}
function executeTest() {
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.getItem(0).value", "70");
+ shouldBe("text.x.animVal.getItem(1).value", "80");
+ shouldBe("text.x.animVal.getItem(2).value", "90");
+ shouldBe("text.x.animVal.getItem(3).value", "110");
}
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);
+ shouldBeCloseEnough("text.x.animVal.getItem(0).value", "70");
+ shouldBeCloseEnough("text.x.animVal.getItem(1).value", "80");
+ shouldBeCloseEnough("text.x.animVal.getItem(2).value", "90");
+ shouldBeCloseEnough("text.x.animVal.getItem(3).value", "110");
}
function executeTest() {
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);
+ shouldBeCloseEnough("text.x.animVal.getItem(0).value", "70");
+ shouldBeCloseEnough("text.x.animVal.getItem(1).value", "80");
+ shouldBeCloseEnough("text.x.animVal.getItem(2).value", "90");
+ shouldBeCloseEnough("text.x.animVal.getItem(3).value", "100");
}
function executeTest() {
}
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");
+ shouldBeCloseEnough("text.x.animVal.getItem(1).value", "80");
+ shouldBeCloseEnough("text.x.animVal.getItem(2).value", "90");
+ shouldBeCloseEnough("text.x.animVal.getItem(3).value", "100");
}
function executeTest() {
}
function sample3() {
- shouldBeCloseEnough("computedStyle.getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "1", 0.01);
+ shouldBeCloseEnough("computedStyle.getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "1");
}
function executeTest() {
}
function sample3() {
- shouldBeCloseEnough("computedStyle.getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "1", 0.01);
+ shouldBeCloseEnough("computedStyle.getPropertyCSSValue('opacity').getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "1");
}
function executeTest() {
}
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);
+ shouldBe("text.rotate.animVal.getItem(0).value", "22.5");
+ shouldBe("text.rotate.animVal.getItem(1).value", "45");
+ shouldBe("text.rotate.animVal.getItem(2).value", "67.5");
+ shouldBe("text.rotate.animVal.getItem(3).value", "90");
}
function sample3() {
- 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);
+ shouldBeCloseEnough("text.rotate.animVal.getItem(0).value", "45");
+ shouldBeCloseEnough("text.rotate.animVal.getItem(1).value", "90");
+ shouldBeCloseEnough("text.rotate.animVal.getItem(2).value", "135");
+ shouldBeCloseEnough("text.rotate.animVal.getItem(3).value", "180");
}
function executeTest() {
}
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);
+ shouldBe("text.rotate.animVal.getItem(0).value", "22.5");
+ shouldBe("text.rotate.animVal.getItem(1).value", "67.5");
+ shouldBe("text.rotate.animVal.getItem(2).value", "112.5");
+ shouldBe("text.rotate.animVal.getItem(3).value", "157.5");
}
function sample3() {
- 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);
+ shouldBeCloseEnough("text.rotate.animVal.getItem(0).value", "45");
+ shouldBeCloseEnough("text.rotate.animVal.getItem(1).value", "90");
+ shouldBeCloseEnough("text.rotate.animVal.getItem(2).value", "135");
+ shouldBeCloseEnough("text.rotate.animVal.getItem(3).value", "180");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "22.5", 0.01);
- shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "7.5", 0.01);
+ shouldBe("feGaussianBlur.stdDeviationX.animVal", "22.5");
+ shouldBe("feGaussianBlur.stdDeviationY.animVal", "7.5");
}
function sample3() {
- shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "40", 0.01);
- shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "10", 0.01);
+ shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "40");
+ shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "10");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "22.5", 0.01);
- shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "7.5", 0.01);
+ shouldBe("feGaussianBlur.stdDeviationX.animVal", "22.5");
+ shouldBe("feGaussianBlur.stdDeviationY.animVal", "7.5");
}
function sample3() {
- shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "40", 0.01);
- shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "10", 0.01);
+ shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "40");
+ shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "10");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "22.5", 0.01);
- shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "7.5", 0.01);
+ shouldBe("feGaussianBlur.stdDeviationX.animVal", "22.5");
+ shouldBe("feGaussianBlur.stdDeviationY.animVal", "7.5");
}
function sample3() {
- shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "5", 0.01);
- shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "5", 0.01);
+ shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "5");
+ shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "5");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "10", 0.01);
- shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "10", 0.01);
+ shouldBe("feGaussianBlur.stdDeviationX.animVal", "10");
+ shouldBe("feGaussianBlur.stdDeviationY.animVal", "10");
}
function sample3() {
- shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "15", 0.01);
- shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "15", 0.01);
+ shouldBeCloseEnough("feGaussianBlur.stdDeviationX.animVal", "15");
+ shouldBeCloseEnough("feGaussianBlur.stdDeviationY.animVal", "15");
}
function executeTest() {
}
function sample2() {
- shouldBeCloseEnough("path.pathSegList.getItem(0).x", "20", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(0).y", "20", 0.01);
+ shouldBe("path.pathSegList.getItem(0).x", "20");
+ shouldBe("path.pathSegList.getItem(0).y", "20");
}
function sample3() {
- shouldBeCloseEnough("path.pathSegList.getItem(0).x", "0.01", 0.01);
- shouldBeCloseEnough("path.pathSegList.getItem(0).y", "0.01", 0.01);
+ shouldBeCloseEnough("path.pathSegList.getItem(0).x", "0");
+ shouldBeCloseEnough("path.pathSegList.getItem(0).y", "0");
}
function executeTest() {
function sample3() {
// Check just before-end conditions
- 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);
+ shouldBeCloseEnough("poly.points.getItem(2).x", "100");
+ shouldBeCloseEnough("poly.points.getItem(2).y", "100");
+ //shouldBeCloseEnough("poly.animatedPoints.getItem(2).x", "300");
+ //shouldBeCloseEnough("poly.animatedPoints.getItem(2).y", "300");
}
function executeTest() {
function sample3() {
// Check just before-end conditions
- 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);
+ shouldBeCloseEnough("poly.points.getItem(2).x", "300");
+ shouldBeCloseEnough("poly.points.getItem(2).y", "300");
+ //shouldBeCloseEnough("poly.animatedPoints.getItem(2).x", "300");
+ //shouldBeCloseEnough("poly.animatedPoints.getItem(2).y", "300");
}
function executeTest() {
}
function sample3() {
- 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.animVal.x", "50");
+ shouldBeCloseEnough("rootSVGElement.viewBox.animVal.y", "50");
+ shouldBeCloseEnough("rootSVGElement.viewBox.animVal.width", "50");
+ shouldBeCloseEnough("rootSVGElement.viewBox.animVal.height", "50");
- 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);
+ shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.x", "50");
+ shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.y", "50");
+ shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.width", "50");
+ shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.height", "50");
}
function executeTest() {
}
function sample3() {
- 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.animVal.x", "50");
+ shouldBeCloseEnough("rootSVGElement.viewBox.animVal.y", "50");
+ shouldBeCloseEnough("rootSVGElement.viewBox.animVal.width", "150");
+ shouldBeCloseEnough("rootSVGElement.viewBox.animVal.height", "150");
- 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);
+ shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.x", "50");
+ shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.y", "50");
+ shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.width", "150");
+ shouldBeCloseEnough("rootSVGElement.viewBox.baseVal.height", "150");
}
function executeTest() {
// Check initial/end conditions
shouldBe("rect.transform.animVal.numberOfItems", "1");
shouldBe("rect.transform.animVal.getItem(0).type", "SVGTransform.SVG_TRANSFORM_SCALE");
- shouldBeCloseEnough("rect.transform.animVal.getItem(0).matrix.a", "0.01", 0.01);
- shouldBeCloseEnough("rect.transform.animVal.getItem(0).matrix.d", "0.01", 0.01);
+ shouldBe("rect.transform.animVal.getItem(0).matrix.a", "0");
+ shouldBe("rect.transform.animVal.getItem(0).matrix.d", "0");
}
function sample2() {
shouldBe("rect.transform.animVal.numberOfItems", "1");
shouldBe("rect.transform.animVal.getItem(0).type", "SVGTransform.SVG_TRANSFORM_SCALE");
- shouldBeCloseEnough("rect.transform.animVal.getItem(0).matrix.a", "1", 0.01);
- shouldBeCloseEnough("rect.transform.animVal.getItem(0).matrix.d", "1", 0.01);
+ shouldBe("rect.transform.animVal.getItem(0).matrix.a", "1");
+ shouldBe("rect.transform.animVal.getItem(0).matrix.d", "1");
}
function sample3() {
shouldBe("rect.transform.animVal.numberOfItems", "1");
shouldBe("rect.transform.animVal.getItem(0).type", "SVGTransform.SVG_TRANSFORM_SCALE");
- shouldBeCloseEnough("rect.transform.animVal.getItem(0).matrix.a", "2", 0.01);
- shouldBeCloseEnough("rect.transform.animVal.getItem(0).matrix.d", "2", 0.01);
+ shouldBeCloseEnough("rect.transform.animVal.getItem(0).matrix.a", "2");
+ shouldBeCloseEnough("rect.transform.animVal.getItem(0).matrix.d", "2");
}
function executeTest() {
function sample1() {
// Check initial/end conditions
shouldBe("rect.transform.animVal.numberOfItems", "0");
- shouldBeCloseEnough("document.defaultView.getComputedStyle(rect).getPropertyValue('x')", "0", 0.01);
- shouldBeCloseEnough("document.defaultView.getComputedStyle(rect).getPropertyValue('y')", "0", 0.01);
+ shouldBeCloseEnough("document.defaultView.getComputedStyle(rect).getPropertyValue('x')", "0");
+ shouldBeCloseEnough("document.defaultView.getComputedStyle(rect).getPropertyValue('y')", "0");
}
function sample2() {
// Check initial/end conditions
shouldBe("rect.transform.animVal.numberOfItems", "1");
shouldBe("rect.transform.animVal.getItem(0).type", "SVGTransform.SVG_TRANSFORM_TRANSLATE");
- shouldBeCloseEnough("rect.transform.animVal.getItem(0).matrix.e", "100", 0.01);
- shouldBeCloseEnough("rect.transform.animVal.getItem(0).matrix.f", "100", 0.01);
+ shouldBeCloseEnough("rect.transform.animVal.getItem(0).matrix.e", "100");
+ shouldBeCloseEnough("rect.transform.animVal.getItem(0).matrix.f", "100");
}
function sample3() {
shouldBe("rect.transform.animVal.numberOfItems", "1");
shouldBe("rect.transform.animVal.getItem(0).type", "SVGTransform.SVG_TRANSFORM_TRANSLATE");
- shouldBeCloseEnough("rect.transform.animVal.getItem(0).matrix.e", "0", 0.01);
- shouldBeCloseEnough("rect.transform.animVal.getItem(0).matrix.f", "0", 0.01);
+ shouldBeCloseEnough("rect.transform.animVal.getItem(0).matrix.e", "0");
+ shouldBeCloseEnough("rect.transform.animVal.getItem(0).matrix.f", "0");
}
function executeTest() {
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 179.96
-PASS marker.orientAngle.baseVal.value is 179.96
+PASS marker.orientAngle.animVal.value is 180
+PASS marker.orientAngle.baseVal.value is 180
PASS marker.orientAngle.animVal.value is 0
PASS marker.orientAngle.baseVal.value is 0
PASS successfullyParsed is true
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 179.96
-PASS marker.orientAngle.baseVal.value is 179.96
+PASS marker.orientAngle.animVal.value is 180
+PASS marker.orientAngle.baseVal.value is 180
PASS marker.orientAngle.animVal.value is 0
PASS marker.orientAngle.baseVal.value is 0
PASS successfullyParsed is true
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 179.96
-PASS marker.orientAngle.baseVal.value is 179.96
+PASS marker.orientAngle.animVal.value is 180
+PASS marker.orientAngle.baseVal.value is 180
PASS marker.orientAngle.animVal.value is 0
PASS marker.orientAngle.baseVal.value is 0
PASS successfullyParsed is true
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 179.96
-PASS marker.orientAngle.baseVal.value is 179.96
+PASS marker.orientAngle.animVal.value is 180
+PASS marker.orientAngle.baseVal.value is 180
PASS marker.orientAngle.animVal.value is 0
PASS marker.orientAngle.baseVal.value is 0
PASS successfullyParsed is true
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 179.96
-PASS marker.orientAngle.baseVal.value is 179.96
+PASS marker.orientAngle.animVal.value is 180
+PASS marker.orientAngle.baseVal.value is 180
PASS marker.orientAngle.animVal.value is 0
PASS marker.orientAngle.baseVal.value is 0
PASS successfullyParsed is true
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 179.96
-PASS marker.orientAngle.baseVal.value is 179.96
+PASS marker.orientAngle.animVal.value is 180
+PASS marker.orientAngle.baseVal.value is 180
PASS marker.orientAngle.animVal.value is 0
PASS marker.orientAngle.baseVal.value is 0
PASS successfullyParsed is true
PASS rect.height.baseVal.value is 100
PASS rect.height.animVal.value is 150
PASS rect.height.baseVal.value is 150
-PASS rect.height.animVal.value is 199.98
-PASS rect.height.baseVal.value is 199.98
+PASS rect.height.animVal.value is 200
+PASS rect.height.baseVal.value is 200
PASS rect.height.animVal.value is 100
PASS rect.height.baseVal.value is 100
PASS successfullyParsed is true
PASS circle.r.animVal.value is 10
PASS circle.r.baseVal.value is 10
-PASS circle.r.animVal.value is 132.475
-PASS circle.r.baseVal.value is 132.475
-PASS circle.r.animVal.value is 254.89
-PASS circle.r.baseVal.value is 254.89
+PASS circle.r.animVal.value is 132.5
+PASS circle.r.baseVal.value is 132.5
+PASS circle.r.animVal.value is 254.9
+PASS circle.r.baseVal.value is 254.9
PASS circle.r.animVal.value is 10
PASS circle.r.baseVal.value is 10
PASS successfullyParsed is true
PASS rect.width.baseVal.value is 100
PASS rect.width.animVal.value is 200
PASS rect.width.baseVal.value is 200
-PASS rect.width.animVal.value is 299.96
-PASS rect.width.baseVal.value is 299.96
+PASS rect.width.animVal.value is 300
+PASS rect.width.baseVal.value is 300
PASS rect.width.animVal.value is 100
PASS rect.width.baseVal.value is 100
PASS successfullyParsed is true
PASS rect.width.baseVal.value is 100
PASS rect.width.animVal.value is 150
PASS rect.width.baseVal.value is 150
-PASS rect.width.animVal.value is 199.98
-PASS rect.width.baseVal.value is 199.98
+PASS rect.width.animVal.value is 200
+PASS rect.width.baseVal.value is 200
PASS rect.width.animVal.value is 100
PASS rect.width.baseVal.value is 100
PASS successfullyParsed is true
PASS rect.width.animVal.value is 100
PASS rect.width.baseVal.value is 100
-PASS rect.width.animVal.value is 144.49
-PASS rect.width.baseVal.value is 144.49
-PASS rect.width.animVal.value is 188.96
-PASS rect.width.baseVal.value is 188.96
+PASS rect.width.animVal.value is 144.5
+PASS rect.width.baseVal.value is 144.5
+PASS rect.width.animVal.value is 189
+PASS rect.width.baseVal.value is 189
PASS rect.width.animVal.value is 100
PASS rect.width.baseVal.value is 100
PASS successfullyParsed is true
PASS rect.width.baseVal.value is 100
PASS rect.width.animVal.value is 150
PASS rect.width.baseVal.value is 150
-PASS rect.width.animVal.value is 199.98
-PASS rect.width.baseVal.value is 199.98
+PASS rect.width.animVal.value is 200
+PASS rect.width.baseVal.value is 200
PASS rect.width.animVal.value is 100
PASS rect.width.baseVal.value is 100
PASS successfullyParsed is true
PASS rect.width.baseVal.value is 100
PASS rect.width.animVal.value is 150
PASS rect.width.baseVal.value is 150
-PASS rect.width.animVal.value is 199.98
-PASS rect.width.baseVal.value is 199.98
+PASS rect.width.animVal.value is 200
+PASS rect.width.baseVal.value is 200
PASS rect.width.animVal.value is 100
PASS rect.width.baseVal.value is 100
PASS successfullyParsed is true
PASS rect.width.baseVal.value is 100
PASS rect.width.animVal.value is 170
PASS rect.width.baseVal.value is 170
-PASS rect.width.animVal.value is 239.96
-PASS rect.width.baseVal.value is 239.96
+PASS rect.width.animVal.value is 240
+PASS rect.width.baseVal.value is 240
PASS rect.width.animVal.value is 100
PASS rect.width.baseVal.value is 100
PASS successfullyParsed is true
PASS rect.width.baseVal.value is 100
PASS rect.width.animVal.value is 150
PASS rect.width.baseVal.value is 150
-PASS rect.width.animVal.value is 199.98
-PASS rect.width.baseVal.value is 199.98
+PASS rect.width.animVal.value is 200
+PASS rect.width.baseVal.value is 200
PASS rect.width.animVal.value is 100
PASS rect.width.baseVal.value is 100
PASS successfullyParsed is true
PASS rect.width.baseVal.value is 100
PASS rect.width.animVal.value is 170
PASS rect.width.baseVal.value is 170
-PASS rect.width.animVal.value is 239.96
-PASS rect.width.baseVal.value is 239.96
+PASS rect.width.animVal.value is 240
+PASS rect.width.baseVal.value is 240
PASS rect.width.animVal.value is 100
PASS rect.width.baseVal.value is 100
PASS successfullyParsed is true
PASS rect.width.baseVal.value is 100
PASS rect.width.animVal.value is 350
PASS rect.width.baseVal.value is 350
-PASS rect.width.animVal.value is 599.88
-PASS rect.width.baseVal.value is 599.88
+PASS rect.width.animVal.value is 600
+PASS rect.width.baseVal.value is 600
PASS rect.width.animVal.value is 100
PASS rect.width.baseVal.value is 100
PASS successfullyParsed is true
PASS rect.width.animVal.value is 100
PASS rect.width.baseVal.value is 100
-PASS rect.width.animVal.value is 161.15
-PASS rect.width.baseVal.value is 161.15
-PASS rect.width.animVal.value is 188.96
-PASS rect.width.baseVal.value is 188.96
+PASS rect.width.animVal.value is 161.2
+PASS rect.width.baseVal.value is 161.2
+PASS rect.width.animVal.value is 189
+PASS rect.width.baseVal.value is 189
PASS rect.width.animVal.value is 100
PASS rect.width.baseVal.value is 100
PASS successfullyParsed is true
PASS rect.width.baseVal.value is 100
PASS rect.width.animVal.value is 150
PASS rect.width.baseVal.value is 150
-PASS rect.width.animVal.value is 199.98
-PASS rect.width.baseVal.value is 199.98
+PASS rect.width.animVal.value is 200
+PASS rect.width.baseVal.value is 200
PASS rect.width.animVal.value is 100
PASS rect.width.baseVal.value is 100
PASS successfullyParsed is true
PASS rect.width.baseVal.value is 100
PASS rect.width.animVal.value is 130
PASS rect.width.baseVal.value is 130
-PASS rect.width.animVal.value is 151.18
-PASS rect.width.baseVal.value is 151.18
+PASS rect.width.animVal.value is 151.2
+PASS rect.width.baseVal.value is 151.2
PASS rect.width.animVal.value is 576
PASS rect.width.baseVal.value is 576
-PASS rect.width.animVal.value is 266.98
-PASS rect.width.baseVal.value is 266.98
+PASS rect.width.animVal.value is 267
+PASS rect.width.baseVal.value is 267
PASS rect.width.animVal.value is 100
PASS rect.width.baseVal.value is 100
PASS successfullyParsed is true
PASS text.x.animVal.getItem(3).value is 110
PASS text.x.animVal.getItem(0).value is 81.7
PASS text.x.animVal.getItem(1).value is 75
-PASS text.x.animVal.getItem(2).value is 144.49
-PASS text.x.animVal.getItem(3).value is 197.33
-PASS text.x.animVal.getItem(0).value is 113.37
+PASS text.x.animVal.getItem(2).value is 144.5
+PASS text.x.animVal.getItem(3).value is 197.3
+PASS text.x.animVal.getItem(0).value is 113.4
PASS text.x.animVal.getItem(1).value is 80
-PASS text.x.animVal.getItem(2).value is 100.02
-PASS text.x.animVal.getItem(3).value is 383.91
+PASS text.x.animVal.getItem(2).value is 100
+PASS text.x.animVal.getItem(3).value is 384
PASS text.x.animVal.getItem(0).value is 50
PASS text.x.animVal.getItem(1).value is 70
PASS text.x.animVal.getItem(2).value is 90
PASS text.rotate.animVal.getItem(1).value is 45
PASS text.rotate.animVal.getItem(2).value is 67.5
PASS text.rotate.animVal.getItem(3).value is 90
-PASS text.rotate.animVal.getItem(0).value is 44.99
-PASS text.rotate.animVal.getItem(1).value is 89.98
-PASS text.rotate.animVal.getItem(2).value is 134.96
-PASS text.rotate.animVal.getItem(3).value is 179.96
+PASS text.rotate.animVal.getItem(0).value is 45
+PASS text.rotate.animVal.getItem(1).value is 90
+PASS text.rotate.animVal.getItem(2).value is 135
+PASS text.rotate.animVal.getItem(3).value is 180
PASS text.rotate.animVal.getItem(0).value is 0
PASS text.rotate.animVal.getItem(1).value is 0
PASS text.rotate.animVal.getItem(2).value is 0
PASS text.rotate.animVal.getItem(1).value is 67.5
PASS text.rotate.animVal.getItem(2).value is 112.5
PASS text.rotate.animVal.getItem(3).value is 157.5
-PASS text.rotate.animVal.getItem(0).value is 44.99
-PASS text.rotate.animVal.getItem(1).value is 89.98
-PASS text.rotate.animVal.getItem(2).value is 134.99
-PASS text.rotate.animVal.getItem(3).value is 179.99
+PASS text.rotate.animVal.getItem(0).value is 45
+PASS text.rotate.animVal.getItem(1).value is 90
+PASS text.rotate.animVal.getItem(2).value is 135
+PASS text.rotate.animVal.getItem(3).value is 180
PASS text.rotate.animVal.getItem(0).value is 0
PASS text.rotate.animVal.getItem(1).value is 45
PASS text.rotate.animVal.getItem(2).value is 90
PASS path.pathSegList.getItem(0).y is 40
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 0
+PASS path.pathSegList.getItem(0).y is 0
PASS path.pathSegList.getItem(0).x is 40
PASS path.pathSegList.getItem(0).y is 40
PASS successfullyParsed is true
PASS poly.points.getItem(2).y is 200
PASS poly.points.getItem(2).x is 150
PASS poly.points.getItem(2).y is 150
-PASS poly.points.getItem(2).x is 100.02
-PASS poly.points.getItem(2).y is 100.02
+PASS poly.points.getItem(2).x is 100
+PASS poly.points.getItem(2).y is 100
PASS poly.points.getItem(2).x is 200
PASS poly.points.getItem(2).y is 200
PASS successfullyParsed is true
PASS poly.points.getItem(2).y is 200
PASS poly.points.getItem(2).x is 250
PASS poly.points.getItem(2).y is 250
-PASS poly.points.getItem(2).x is 299.98
-PASS poly.points.getItem(2).y is 299.98
+PASS poly.points.getItem(2).x is 300
+PASS poly.points.getItem(2).y is 300
PASS poly.points.getItem(2).x is 200
PASS poly.points.getItem(2).y is 200
PASS successfullyParsed is true
PASS rootSVGElement.viewBox.baseVal.y is 25
PASS rootSVGElement.viewBox.baseVal.width is 75
PASS rootSVGElement.viewBox.baseVal.height is 75
-PASS rootSVGElement.viewBox.animVal.x is 49.98
-PASS rootSVGElement.viewBox.animVal.y is 49.98
-PASS rootSVGElement.viewBox.animVal.width is 50.01
-PASS rootSVGElement.viewBox.animVal.height is 50.01
-PASS rootSVGElement.viewBox.baseVal.x is 49.98
-PASS rootSVGElement.viewBox.baseVal.y is 49.98
-PASS rootSVGElement.viewBox.baseVal.width is 50.01
-PASS rootSVGElement.viewBox.baseVal.height is 50.01
+PASS rootSVGElement.viewBox.animVal.x is 50
+PASS rootSVGElement.viewBox.animVal.y is 50
+PASS rootSVGElement.viewBox.animVal.width is 50
+PASS rootSVGElement.viewBox.animVal.height is 50
+PASS rootSVGElement.viewBox.baseVal.x is 50
+PASS rootSVGElement.viewBox.baseVal.y is 50
+PASS rootSVGElement.viewBox.baseVal.width is 50
+PASS rootSVGElement.viewBox.baseVal.height is 50
PASS rootSVGElement.viewBox.animVal.x is 0
PASS rootSVGElement.viewBox.animVal.y is 0
PASS rootSVGElement.viewBox.animVal.width is 100
PASS rootSVGElement.viewBox.baseVal.y is 25
PASS rootSVGElement.viewBox.baseVal.width is 125
PASS rootSVGElement.viewBox.baseVal.height is 125
-PASS rootSVGElement.viewBox.animVal.x is 49.98
-PASS rootSVGElement.viewBox.animVal.y is 49.98
-PASS rootSVGElement.viewBox.animVal.width is 149.98
-PASS rootSVGElement.viewBox.animVal.height is 149.98
-PASS rootSVGElement.viewBox.baseVal.x is 49.98
-PASS rootSVGElement.viewBox.baseVal.y is 49.98
-PASS rootSVGElement.viewBox.baseVal.width is 149.98
-PASS rootSVGElement.viewBox.baseVal.height is 149.98
+PASS rootSVGElement.viewBox.animVal.x is 50
+PASS rootSVGElement.viewBox.animVal.y is 50
+PASS rootSVGElement.viewBox.animVal.width is 150
+PASS rootSVGElement.viewBox.animVal.height is 150
+PASS rootSVGElement.viewBox.baseVal.x is 50
+PASS rootSVGElement.viewBox.baseVal.y is 50
+PASS rootSVGElement.viewBox.baseVal.width is 150
+PASS rootSVGElement.viewBox.baseVal.height is 150
PASS rootSVGElement.viewBox.animVal.x is 0
PASS rootSVGElement.viewBox.animVal.y is 0
PASS rootSVGElement.viewBox.animVal.width is 100
PASS rect.transform.animVal.numberOfItems is 1
PASS rect.transform.animVal.getItem(0).type is SVGTransform.SVG_TRANSFORM_SCALE
-PASS rect.transform.animVal.getItem(0).matrix.a is 0.01
-PASS rect.transform.animVal.getItem(0).matrix.d is 0.01
+PASS rect.transform.animVal.getItem(0).matrix.a is 0
+PASS rect.transform.animVal.getItem(0).matrix.d is 0
PASS rect.transform.animVal.numberOfItems is 1
PASS rect.transform.animVal.getItem(0).type is SVGTransform.SVG_TRANSFORM_SCALE
PASS rect.transform.animVal.getItem(0).matrix.a is 1