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

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

Issue 1415513010: Web Animations: Add SVGRectInterpolationType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_svgIOIInterpolationType
Patch Set: neutralKeyframe Created 5 years 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 unified diff | Download patch
OLDNEW
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
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
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 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698