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..4c88ea541be44c8f08a39c803fdcbeb4ed49b4ad 100644 |
--- a/third_party/WebKit/LayoutTests/animations/interpolation/resources/interpolation-test.js |
+++ b/third_party/WebKit/LayoutTests/animations/interpolation/resources/interpolation-test.js |
@@ -184,6 +184,14 @@ |
}); |
} |
+ function toCamelCase(property) { |
+ var i = property.length; |
+ while ((i = property.lastIndexOf('-', i - 1)) !== -1) { |
+ 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 +347,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() { |