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('')); |