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

Unified Diff: polymer_0.5.4/bower_components/web-animations-js/test/js/matrix-interpolation.js

Issue 895523005: Added Polymer 0.5.4 (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 years, 11 months 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: polymer_0.5.4/bower_components/web-animations-js/test/js/matrix-interpolation.js
diff --git a/polymer_0.5.0/bower_components/web-animations-js/test/js/matrix-interpolation.js b/polymer_0.5.4/bower_components/web-animations-js/test/js/matrix-interpolation.js
similarity index 85%
copy from polymer_0.5.0/bower_components/web-animations-js/test/js/matrix-interpolation.js
copy to polymer_0.5.4/bower_components/web-animations-js/test/js/matrix-interpolation.js
index 1891c246a39bfab8c71d77a441646cd4ae0217d9..4de36f7cc8004e13c3733e1570dd4f8c99d23c23 100644
--- a/polymer_0.5.0/bower_components/web-animations-js/test/js/matrix-interpolation.js
+++ b/polymer_0.5.4/bower_components/web-animations-js/test/js/matrix-interpolation.js
@@ -8,11 +8,11 @@ suite('matrix interpolation', function() {
}
function compareInterpolatedTransforms(actual, expected, timeFraction) {
- var actualInterp = webAnimationsMinifill.propertyInterpolation(
+ var actualInterp = webAnimations1.propertyInterpolation(
'transform',
actual[0],
actual[1]);
- var expectedInterp = webAnimationsMinifill.propertyInterpolation(
+ var expectedInterp = webAnimations1.propertyInterpolation(
'transform',
expected[0],
expected[1]);
@@ -32,21 +32,21 @@ suite('matrix interpolation', function() {
}
test('transform interpolations with matrices only', function() {
- var interpolatedMatrix = webAnimationsMinifill.propertyInterpolation(
+ var interpolatedMatrix = webAnimations1.propertyInterpolation(
'transform',
'matrix(1, 0, 0, 1, 0, 0)',
'matrix(1, -0.2, 0, 1, 0, 0)');
var evaluatedInterp = interpolatedMatrix(0.5);
compareMatrices(evaluatedInterp, [1, -0.1, 0, 1, 0, 0], 6);
- interpolatedMatrix = webAnimationsMinifill.propertyInterpolation(
+ interpolatedMatrix = webAnimations1.propertyInterpolation(
'transform',
'matrix(1, 0, 0, 1, 0, 0)',
'matrix3d(1, 1, 0, 0, -2, 1, 0, 0, 0, 0, 1, 0, 10, 10, 0, 1)');
evaluatedInterp = interpolatedMatrix(0.5);
compareMatrices(evaluatedInterp, [1.12, 0.46, -0.84, 1.34, 5, 5], 6);
- interpolatedMatrix = webAnimationsMinifill.propertyInterpolation(
+ interpolatedMatrix = webAnimations1.propertyInterpolation(
'transform',
'matrix(1, 0, 0, 1, 0, 0)',
'matrix3d(1, 1, 3, 0, -2, 1, 0, 0, 0, 0, 1, 0, 10, 10, 0, 1)');
@@ -58,7 +58,7 @@ suite('matrix interpolation', function() {
[1.73, 0.67, 1.10, 0, -0.85, 1.34, 0.29, 0, -0.35, -0.22, 0.58, 0, 5, 5, 0, 1],
16);
- interpolatedMatrix = webAnimationsMinifill.propertyInterpolation(
+ interpolatedMatrix = webAnimations1.propertyInterpolation(
'transform',
'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)',
'matrix3d(1, 2, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 10, 10, 1)');
@@ -68,7 +68,7 @@ suite('matrix interpolation', function() {
[1.38, 0.85, 0, 0, 0.24, 1.00, 0, 0, 0, 0, 1, 0, 0, 5, 5, 1],
16);
- interpolatedMatrix = webAnimationsMinifill.propertyInterpolation(
+ interpolatedMatrix = webAnimations1.propertyInterpolation(
'transform',
'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)',
'matrix3d(1, 1, 0, 0, -2, 1, 0, 0, 0, 0, 1, 0, 10, 10, 0, 1)');
@@ -76,7 +76,7 @@ suite('matrix interpolation', function() {
compareMatrices(evaluatedInterp, [1.12, 0.46, -0.84, 1.34, 5, 5], 6);
// Test matrices with [3][3] != 1
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'matrix(1, 0, 0, 1, 0, 0)',
'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2)');
@@ -93,7 +93,7 @@ suite('matrix interpolation', function() {
});
test('transform interpolations with matrices and other functions', function() {
- var interp = webAnimationsMinifill.propertyInterpolation(
+ var interp = webAnimations1.propertyInterpolation(
'transform',
'translate(100px) matrix(1, 0, 0, 1, 0, 0)',
'translate(10px) matrix(1, -0.2, 0, 1, 0, 0)');
@@ -103,7 +103,7 @@ suite('matrix interpolation', function() {
assert.equal(functions[0], 'translate(55px,0px)');
compareMatrices(functions[1], [1, -0.1, 0, 1, 0, 0], 6);
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'translate(100px) matrix(1, 0, 0, 1, 0, 0) rotate(10deg)',
'translate(10px) matrix(1, -0.2, 0, 1, 0, 0) rotate(100deg)');
@@ -114,7 +114,7 @@ suite('matrix interpolation', function() {
compareMatrices(functions[1], [1, -0.1, 0, 1, 0, 0], 6);
assert.equal(functions[2], 'rotate(55deg)');
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'translate(100px) matrix(1, 0, 0, 1, 0, 0) rotate(10deg)',
'translate(10px) matrix3d(1, 2, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 10, 10, 1) rotate(100deg)');
@@ -129,7 +129,7 @@ suite('matrix interpolation', function() {
assert.equal(functions[2], 'rotate(55deg)');
// Contains matrices and requires matrix decomposition.
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'matrix(1, 0, 0, 1, 0, 0) translate(100px)',
'translate(10px) matrix(1, -0.2, 0, 1, 0, 0)');
@@ -137,7 +137,7 @@ suite('matrix interpolation', function() {
compareMatrices(evaluatedInterp, [1, -0.1, 0, 1, 55, 0], 6);
// Test matrices with [3][3] != 1
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'translate(100px) matrix(1, 0, 0, 1, 0, 0) rotate(10deg)',
'translate(10px) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2) rotate(100deg)');
@@ -160,7 +160,7 @@ suite('matrix interpolation', function() {
16);
assert.equal(functions[2], 'rotate(64deg)');
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'translate(10px) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2) rotate(100deg)',
'translate(100px) matrix(1, 0, 0, 1, 0, 0) rotate(10deg)');
@@ -185,14 +185,14 @@ suite('matrix interpolation', function() {
});
test('transform interpolations that require matrix decomposition', function() {
- var interp = webAnimationsMinifill.propertyInterpolation(
+ var interp = webAnimations1.propertyInterpolation(
'transform',
'translate(10px)',
'scale(2)');
var evaluatedInterp = interp(0.4);
compareMatrices(evaluatedInterp, [1.4, 0, 0, 1.4, 6, 0], 6);
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'rotateX(10deg)',
'rotateY(20deg)');
@@ -202,14 +202,14 @@ suite('matrix interpolation', function() {
[0.99, 0.01, -0.14, 0, 0.01, 1.00, 0.10, 0, 0.14, -0.10, 0.98, 0, 0, 0, 0, 1],
16);
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'rotate(0rad) translate(0px)',
'translate(800px) rotate(9rad)');
evaluatedInterp = interp(0.4);
compareMatrices(evaluatedInterp, [0.47, 0.89, -0.89, 0.47, 320, 0], 6);
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'rotateX(10deg)',
'translate(10px) rotateX(200deg)');
@@ -222,21 +222,21 @@ suite('matrix interpolation', function() {
// This case agrees with FireFox and the spec, but not with the old polyfill or Blink. The old
// polyfill only does matrix decomposition on the rotate section of the function
// lists.
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'translate(0px)',
'translate(800px) rotate(9rad)');
evaluatedInterp = interp(0.4);
compareMatrices(evaluatedInterp, [0.47, 0.89, -0.89, 0.47, 320, 0], 6);
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'translate(0px, 0px) rotate(0deg) scale(1)',
'translate(900px, 190px) scale(3) rotate(9rad)');
evaluatedInterp = interp(0.4);
compareMatrices(evaluatedInterp, [0.84, 1.59, -1.59, 0.84, 360, 76], 6);
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'perspective(1000px)',
'perspective(200px)');
@@ -262,7 +262,7 @@ suite('matrix interpolation', function() {
});
test('decompose various CSS properties', function() {
- var interp = webAnimationsMinifill.propertyInterpolation(
+ var interp = webAnimations1.propertyInterpolation(
'transform',
'rotateX(110deg)',
'rotateX(10deg) matrix(1, 0, 0, 1, 0, 0)');
@@ -271,14 +271,14 @@ suite('matrix interpolation', function() {
// FIXME: This test case differs from blink transitions which gives -1(this)
// This case agrees with FireFox transitions.
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'rotateY(10rad)',
'rotateY(2rad) matrix(1, 0, 0, 1, 0, 0)');
evaluatedInterp = interp(0.5);
compareMatrices(evaluatedInterp, [0.960, 0, 0.279, 0, 0, 1, 0, 0, -0.279, 0, 0.960, 0, 0, 0, 0, 1], 16);
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'rotate(320deg)',
'rotate(10deg) matrix(1, 0, 0, 1, 0, 0)');
@@ -287,7 +287,7 @@ suite('matrix interpolation', function() {
// FIXME: This test case differs from blink transitions which gives -1(this)
// This case agrees with FireFox transitions.
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'rotateZ(10rad)',
'rotateZ(2rad) matrix(1, 0, 0, 1, 0, 0)');
@@ -298,105 +298,105 @@ suite('matrix interpolation', function() {
// which gives matrix3d(-0.24, +0.91, +0.33, +0, +0.33, -0.24, +0.91, +0, +0.91, +0.33, -0.24, +0, +0, +0, +0, +1)
// versus our matrix3d(+0.91, -0.24, +0.33, +0, +0.33, +0.91, -0.24, +0, -0.24, +0.33, +0.91, +0, +0, +0, +0, +1)
// This case agrees with FireFox transitions.
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'rotate3d(1, 1, 1, 100deg)',
'rotate3d(1, 1, 1, 200deg) matrix(1, 0, 0, 1, 0, 0)');
evaluatedInterp = interp(0.5);
compareMatrices(evaluatedInterp, [0.911, -0.244, 0.333, 0, 0.333, 0.911, -0.244, 0, -0.244, 0.333, 0.911, 0, 0, 0, 0, 1], 16);
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'scale(10)',
'scale(2) matrix(1, 0, 0, 1, 0, 0)');
evaluatedInterp = interp(0.5);
compareMatrices(evaluatedInterp, [6, 0, 0, 6, 0, 0], 6);
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'scalex(10)',
'scalex(2) matrix(1, 0, 0, 1, 0, 0)');
evaluatedInterp = interp(0.5);
compareMatrices(evaluatedInterp, [6, 0, 0, 1, 0, 0], 6);
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'scaley(10)',
'scaley(2) matrix(1, 0, 0, 1, 0, 0)');
evaluatedInterp = interp(0.5);
compareMatrices(evaluatedInterp, [1, 0, 0, 6, 0, 0], 6);
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'scalez(10)',
'scalez(2) matrix(1, 0, 0, 1, 0, 0)');
evaluatedInterp = interp(0.5);
compareMatrices(evaluatedInterp, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 6, 0, 0, 0, 0, 1], 16);
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'scale3d(6, 8, 10)',
'scale3d(2, 2, 2) matrix(1, 0, 0, 1, 0, 0)');
evaluatedInterp = interp(0.5);
compareMatrices(evaluatedInterp, [4, 0, 0, 0, 0, 5, 0, 0, 0, 0, 6, 0, 0, 0, 0, 1], 16);
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'skew(30deg)',
'skew(0deg) matrix(1, 0, 0, 1, 0, 0)');
evaluatedInterp = interp(0.5);
compareMatrices(evaluatedInterp, [1, 0, 0.289, 1, 0, 0], 6);
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'skewx(3rad)',
'skewx(1rad) matrix(1, 0, 0, 1, 0, 0)');
evaluatedInterp = interp(0.5);
compareMatrices(evaluatedInterp, [1, 0, 0.707, 1, 0, 0], 6);
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'skewy(3rad)',
'skewy(1rad) matrix(1, 0, 0, 1, 0, 0)');
evaluatedInterp = interp(0.5);
compareMatrices(evaluatedInterp, [1.301, 0.595, 0.174, 0.921, 0, 0], 6);
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'translate(10px, 20px)',
'translate(100px, 200px) matrix(1, 0, 0, 1, 0, 0)');
evaluatedInterp = interp(0.5);
compareMatrices(evaluatedInterp, [1, 0, 0, 1, 55, 110], 6);
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'translatex(10px)',
'translatex(100px) matrix(1, 0, 0, 1, 0, 0)');
evaluatedInterp = interp(0.5);
compareMatrices(evaluatedInterp, [1, 0, 0, 1, 55, 0], 6);
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'translatey(10px)',
'translatey(100px) matrix(1, 0, 0, 1, 0, 0)');
evaluatedInterp = interp(0.5);
compareMatrices(evaluatedInterp, [1, 0, 0, 1, 0, 55], 6);
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'translatez(20px)',
'translatez(200px) matrix(1, 0, 0, 1, 0, 0)');
evaluatedInterp = interp(0.5);
compareMatrices(evaluatedInterp, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 110, 1], 16);
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'translate3d(10px, 10px, 10px)',
'translate3d(20px, 20px, 20px) matrix(1, 0, 0, 1, 0, 0)');
evaluatedInterp = interp(0.5);
compareMatrices(evaluatedInterp, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 15, 15, 15, 1], 16);
- interp = webAnimationsMinifill.propertyInterpolation(
+ interp = webAnimations1.propertyInterpolation(
'transform',
'perspective(300px)',
'perspective(900px) matrix(1, 0, 0, 1, 0, 0)');
@@ -478,17 +478,17 @@ suite('matrix interpolation', function() {
test('transform interpolations involving matrices when matrix code is not available', function() {
// FIXME: This is vulnerable to module interface changes. Can we disable modules?
- var composeMatrix = webAnimationsMinifill.composeMatrix;
- var quat = webAnimationsMinifill.quat;
- var dot = webAnimationsMinifill.dot;
- var makeMatrixDecomposition = webAnimationsMinifill.makeMatrixDecomposition;
- webAnimationsMinifill.composeMatrix = undefined;
- webAnimationsMinifill.quat = undefined;
- webAnimationsMinifill.dot = undefined;
- webAnimationsMinifill.makeMatrixDecomposition = undefined;
+ var composeMatrix = webAnimations1.composeMatrix;
+ var quat = webAnimations1.quat;
+ var dot = webAnimations1.dot;
+ var makeMatrixDecomposition = webAnimations1.makeMatrixDecomposition;
+ webAnimations1.composeMatrix = undefined;
+ webAnimations1.quat = undefined;
+ webAnimations1.dot = undefined;
+ webAnimations1.makeMatrixDecomposition = undefined;
var testFlipTransformLists = function(keyframeFrom, keyframeTo) {
- var interp = webAnimationsMinifill.propertyInterpolation(
+ var interp = webAnimations1.propertyInterpolation(
'transform',
keyframeFrom,
keyframeTo);
@@ -523,10 +523,10 @@ suite('matrix interpolation', function() {
'matrix(1, 0, 0, 1, 0, 0) translate(100px)',
'translate(10px) matrix(1, -0.2, 0, 1, 0, 0)');
} finally {
- webAnimationsMinifill.composeMatrix = composeMatrix;
- webAnimationsMinifill.quat = quat;
- webAnimationsMinifill.dot = dot;
- webAnimationsMinifill.makeMatrixDecomposition = makeMatrixDecomposition;
+ webAnimations1.composeMatrix = composeMatrix;
+ webAnimations1.quat = quat;
+ webAnimations1.dot = dot;
+ webAnimations1.makeMatrixDecomposition = makeMatrixDecomposition;
}
});
});

Powered by Google App Engine
This is Rietveld 408576698