| Index: third_party/WebKit/LayoutTests/animations/svg-attribute-interpolation/resources/interpolation-test.js
|
| diff --git a/third_party/WebKit/LayoutTests/animations/svg-attribute-interpolation/resources/interpolation-test.js b/third_party/WebKit/LayoutTests/animations/svg-attribute-interpolation/resources/interpolation-test.js
|
| index fee72b2a7d703863d97d2c9353ed4296b7f3121b..16484d640eb8ca543516c262cecdeb3bbde6eff3 100644
|
| --- a/third_party/WebKit/LayoutTests/animations/svg-attribute-interpolation/resources/interpolation-test.js
|
| +++ b/third_party/WebKit/LayoutTests/animations/svg-attribute-interpolation/resources/interpolation-test.js
|
| @@ -58,6 +58,9 @@
|
| }
|
|
|
| function normalizeValue(value) {
|
| + if (value === null) {
|
| + return '-NULL-';
|
| + }
|
| return roundNumbers(value).
|
| // Place whitespace between tokens.
|
| replace(/([\w\d.]+|[^\s])/g, '$1 ').
|
| @@ -314,16 +317,22 @@
|
| case 'Web Animations':
|
| // Replace 'transform' with 'svgTransform', etc. This avoids collisions with CSS properties or the Web Animations API (offset).
|
| var prefixedProperty = 'svg' + params.property[0].toUpperCase() + params.property.slice(1);
|
| - target.animate([
|
| - {
|
| + var keyFrames = [];
|
| + if (params.from !== '') {
|
| + keyFrames.push({
|
| + offset: 0,
|
| [prefixedProperty]: params.from,
|
| composite: params.fromComposite,
|
| - },
|
| - {
|
| + })
|
| + }
|
| + if (params.to !== '') {
|
| + keyFrames.push({
|
| + offset: 1,
|
| [prefixedProperty]: params.to,
|
| composite: params.toComposite,
|
| - },
|
| - ], {
|
| + })
|
| + }
|
| + target.animate(keyFrames, {
|
| fill: 'forwards',
|
| duration: 1,
|
| easing: createEasing(expectation.at),
|
|
|