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

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

Issue 1416703004: Web Animations: Add SVGIntegerOptionalIntegerInterpolationType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_svgNONInterpolationType
Patch Set: Fix test Created 5 years, 1 month 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/svg-attribute-interpolation/resources/interpolation-test.js
diff --git a/third_party/WebKit/LayoutTests/animations/svg-attribute-interpolation/resources/interpolation-test.js b/third_party/WebKit/LayoutTests/animations/svg-attribute-interpolation/resources/interpolation-test.js
index 6e24685ba098206b429ab55e75d6bf01141b577d..5a44159b2558f2c3fa56486af9ba9f6fabcb397d 100644
--- a/third_party/WebKit/LayoutTests/animations/svg-attribute-interpolation/resources/interpolation-test.js
+++ b/third_party/WebKit/LayoutTests/animations/svg-attribute-interpolation/resources/interpolation-test.js
@@ -368,6 +368,10 @@
return target;
}
+ function reprKeyframe(x) {
dstockwell 2015/11/23 04:51:43 this isn't python. repr is a bit weird.
alancutter (OOO until 2018) 2015/11/23 06:10:36 This change is out of date with other landed patch
+ return (typeof x === 'string') ? "'" + x + "'" : null;
+ }
+
function createTestTargets(interpolationTests, container, rebaselineContainer) {
var targets = [];
for (var interpolationTest of interpolationTests) {
@@ -381,19 +385,14 @@
if (rebaselineTests) {
var rebaseline = createElement('pre', rebaselineContainer);
-
- var fromCode = 'from' in params ? `
- from: '${params.from}',
- fromComposite: '${params.fromComposite}',` : '';
-
- var toCode = 'to' in params ? `
- to: '${params.to}',
- toComposite: '${params.toComposite}',` : '';
-
rebaseline.appendChild(document.createTextNode(`\
assertAttributeInterpolation({
property: '${params.property}',
- underlying: '${params.underlying}',${fromCode}${toCode}
+ underlying: '${params.underlying}',
+ from: ${reprKeyframe(params.from)},
+ fromComposite: '${params.fromComposite}',
+ to: ${reprKeyframe(params.to)},
+ toComposite: '${params.toComposite}',
}, [\n`));
var rebaselineExpectation;
rebaseline.appendChild(rebaselineExpectation = document.createTextNode(''));

Powered by Google App Engine
This is Rietveld 408576698