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

Unified Diff: third_party/WebKit/LayoutTests/animations/big-number-clamping.html

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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/animations/css-animation-overrides-svg-presentation-attribute-animation-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/animations/big-number-clamping.html
diff --git a/third_party/WebKit/LayoutTests/animations/big-number-clamping.html b/third_party/WebKit/LayoutTests/animations/big-number-clamping.html
index 3830f90bf2c55dda69e2ed2232c46e0f1ac9e240..d68264ba1af1b99483e40384626d509fd4e36827 100644
--- a/third_party/WebKit/LayoutTests/animations/big-number-clamping.html
+++ b/third_party/WebKit/LayoutTests/animations/big-number-clamping.html
@@ -25,9 +25,18 @@ var numberProperties = [
var bigNumber = 1e20;
+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;
+}
+
for (var property of numberProperties) {
test(() => {
- animated.animate({[property]: bigNumber}, {fill: 'forwards'});
+ animated.animate({[toCamelCase(property)]: bigNumber}, {fill: 'forwards'});
reference.style[property] = bigNumber;
assert_equals(getComputedStyle(animated)[property], getComputedStyle(reference)[property]);
}, `Animations on ${property} should clamp identically to setting inline style`);
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/animations/css-animation-overrides-svg-presentation-attribute-animation-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698