Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2018)

Unified Diff: third_party/WebKit/LayoutTests/animations/interpolation/resources/interpolation-test.js

Issue 1771733002: Web Animations: Use of hyphens is no longer supported (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoid Windows Release failure Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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() {

Powered by Google App Engine
This is Rietveld 408576698