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

Unified Diff: third_party/WebKit/LayoutTests/animations/responsive/resources/responsive-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/responsive/resources/responsive-test.js
diff --git a/third_party/WebKit/LayoutTests/animations/responsive/resources/responsive-test.js b/third_party/WebKit/LayoutTests/animations/responsive/resources/responsive-test.js
index c7e63e7c19f60ace1b09ba0a6e5d711343d8f7e4..05f803e2fa2211aa6491316bf7c594590cc58b4f 100644
--- a/third_party/WebKit/LayoutTests/animations/responsive/resources/responsive-test.js
+++ b/third_party/WebKit/LayoutTests/animations/responsive/resources/responsive-test.js
@@ -51,7 +51,7 @@ function assertCSSResponsive(options) {
options,
bindings: {
prefixProperty(property) {
- return property;
+ return toCamelCase(property);
},
createTargetContainer(container) {
if (options.targetTag) {
@@ -163,6 +163,15 @@ function keyframeText(keyframe) {
return isNeutralKeyframe(keyframe) ? 'neutral' : `[${keyframe}]`;
}
+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 createKeyframes(prefixedProperty, from, to) {
var keyframes = [];
if (!isNeutralKeyframe(from)) {

Powered by Google App Engine
This is Rietveld 408576698