OLD | NEW |
1 /* Copyright 2015 The Chromium Authors. All rights reserved. | 1 /* Copyright 2015 The Chromium Authors. All rights reserved. |
2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
4 * | 4 * |
5 * Exported function: | 5 * Exported function: |
6 * - assertAttributeInterpolation({property, from, to, [fromComposite], [toComp
osite], [underlying]}, [{at: fraction, is: value}]) | 6 * - assertAttributeInterpolation({property, from, to, [fromComposite], [toComp
osite], [underlying]}, [{at: fraction, is: value}]) |
7 * Constructs a test case for each fraction that asserts the expected val
ue | 7 * Constructs a test case for each fraction that asserts the expected val
ue |
8 * equals the value produced by interpolation between from and to composi
ted | 8 * equals the value produced by interpolation between from and to composi
ted |
9 * onto underlying by fromComposite and toComposite respectively using | 9 * onto underlying by fromComposite and toComposite respectively using |
10 * SMIL and Web Animations. | 10 * SMIL and Web Animations. |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 elements.push(point.y); | 132 elements.push(point.y); |
133 } | 133 } |
134 return String(elements); | 134 return String(elements); |
135 } | 135 } |
136 | 136 |
137 function serializeSVGPreserveAspectRatio(preserveAspectRatio) { | 137 function serializeSVGPreserveAspectRatio(preserveAspectRatio) { |
138 return String([preserveAspectRatio.align, preserveAspectRatio.meetOrSlice]); | 138 return String([preserveAspectRatio.align, preserveAspectRatio.meetOrSlice]); |
139 } | 139 } |
140 | 140 |
141 function serializeSVGRect(rect) { | 141 function serializeSVGRect(rect) { |
142 return String([rect.x, rect.y, rect.width, rect.height]); | 142 return [rect.x, rect.y, rect.width, rect.height].join(', '); |
143 } | 143 } |
144 | 144 |
145 function serializeSVGTransformList(transformList) { | 145 function serializeSVGTransformList(transformList) { |
146 var elements = []; | 146 var elements = []; |
147 for (var index = 0; index < transformList.numberOfItems; ++index) { | 147 for (var index = 0; index < transformList.numberOfItems; ++index) { |
148 var transform = transformList.getItem(index); | 148 var transform = transformList.getItem(index); |
149 elements.push(transform.type); | 149 elements.push(transform.type); |
150 elements.push(transform.angle); | 150 elements.push(transform.angle); |
151 elements.push(transform.matrix.a); | 151 elements.push(transform.matrix.a); |
152 elements.push(transform.matrix.b); | 152 elements.push(transform.matrix.b); |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 }).then(() => { | 471 }).then(() => { |
472 var asyncHandle = async_test('This test uses interpolation-test.js.') | 472 var asyncHandle = async_test('This test uses interpolation-test.js.') |
473 requestAnimationFrame(() => { | 473 requestAnimationFrame(() => { |
474 runTests().then(() => asyncHandle.done()); | 474 runTests().then(() => asyncHandle.done()); |
475 }); | 475 }); |
476 }); | 476 }); |
477 | 477 |
478 window.assertAttributeInterpolation = assertAttributeInterpolation; | 478 window.assertAttributeInterpolation = assertAttributeInterpolation; |
479 window.neutralKeyframe = neutralKeyframe; | 479 window.neutralKeyframe = neutralKeyframe; |
480 })(); | 480 })(); |
OLD | NEW |