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

Side by Side 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: 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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 assertionCode += ` to: neutralKeyframe,\n`; 403 assertionCode += ` to: neutralKeyframe,\n`;
404 } else { 404 } else {
405 assertionCode += 405 assertionCode +=
406 ` to: '${params.to}',\n` + 406 ` to: '${params.to}',\n` +
407 ` fromComposite: '${params.fromComposite}',\n`; 407 ` fromComposite: '${params.fromComposite}',\n`;
408 } 408 }
409 409
410 assertionCode += `\n}, [\n`; 410 assertionCode += `\n}, [\n`;
411 411
412 rebaseline.appendChild(document.createTextNode(assertionCode)); 412 rebaseline.appendChild(document.createTextNode(assertionCode));
413 var rebaselineExpectation; 413 var rebaselineExpectation = document.createTextNode('');
414 rebaseline.appendChild(rebaselineExpectation = document.createTextNode(' ')); 414 rebaseline.appendChild(rebaselineExpectation);
415 rebaseline.appendChild(document.createTextNode(']);\n\n')); 415 rebaseline.appendChild(document.createTextNode(']);\n\n'));
416 } 416 }
417 417
418 for (var method of ['SMIL', 'Web Animations']) { 418 for (var method of ['SMIL', 'Web Animations']) {
419 if (method === 'SMIL' && params.fromComposite !== params.toComposite) { 419 if (method === 'SMIL' && params.fromComposite !== params.toComposite) {
420 continue; 420 continue;
421 } 421 }
422 createElement('pre', container).textContent = `${method}: ${description} `; 422 createElement('pre', container).textContent = `${method}: ${description} `;
423 var smilContainer = createElement('div', container); 423 var smilContainer = createElement('div', container);
424 for (var expectation of interpolationTest.expectations) { 424 for (var expectation of interpolationTest.expectations) {
(...skipping 46 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