| Index: third_party/WebKit/LayoutTests/animations/interpolation/resources/interpolation-test.js
|
| diff --git a/third_party/WebKit/LayoutTests/animations/interpolation/resources/interpolation-test.js b/third_party/WebKit/LayoutTests/animations/interpolation/resources/interpolation-test.js
|
| index 14a138da2439291ce7ada03568ccf4f61bf52c0e..791e63eb4acba9574476bd2cbfbb2c478c4ee417 100644
|
| --- a/third_party/WebKit/LayoutTests/animations/interpolation/resources/interpolation-test.js
|
| +++ b/third_party/WebKit/LayoutTests/animations/interpolation/resources/interpolation-test.js
|
| @@ -118,12 +118,7 @@
|
| return expectFlip(from, to, 0.5);
|
| },
|
| interpolate: function(property, from, to, at, target) {
|
| - // Convert to camelCase
|
| - for (var i = property.length - 2; i > 0; --i) {
|
| - if (property[i] === '-') {
|
| - property = property.substring(0, i) + property[i + 1].toUpperCase() + property.substring(i + 2);
|
| - }
|
| - }
|
| + property = toCamelCase(property);
|
| this.interpolateKeyframes([
|
| {offset: 0, [property]: from},
|
| {offset: 1, [property]: to},
|
| @@ -184,6 +179,15 @@
|
| });
|
| }
|
|
|
| + function toCamelCase(property) {
|
| + for (var i = property.length - 2; i > 0; --i) {
|
| + if (property[i] === '-') {
|
| + property = property.substring(0, i) + property[i + 1].toUpperCase() + property.substring(i + 2);
|
| + }
|
| + }
|
| + return property;
|
| + }
|
| +
|
| function createTargetContainer(parent, className) {
|
| var targetContainer = createElement(parent);
|
| targetContainer.classList.add('container');
|
| @@ -339,11 +343,11 @@ assertComposition({
|
| webAnimationsInterpolation.interpolateKeyframes([{
|
| offset: 0,
|
| composite: fromComposite,
|
| - [property]: from,
|
| + [toCamelCase(property)]: from,
|
| }, {
|
| offset: 1,
|
| composite: toComposite,
|
| - [property]: to,
|
| + [toCamelCase(property)]: to,
|
| }], expectation.at, target);
|
| };
|
| target.measure = function() {
|
|
|