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

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

Issue 786953007: npm_modules: Fork bower_components into Polymer 0.4.0 and 0.5.0 versions (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 years, 12 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.0/bower_components/web-animations-js/test/js/interpolation.js
diff --git a/polymer_0.5.0/bower_components/web-animations-js/test/js/interpolation.js b/polymer_0.5.0/bower_components/web-animations-js/test/js/interpolation.js
new file mode 100644
index 0000000000000000000000000000000000000000..d69158d35db5ddbf5ac6cc10d6fa93352f8f9439
--- /dev/null
+++ b/polymer_0.5.0/bower_components/web-animations-js/test/js/interpolation.js
@@ -0,0 +1,16 @@
+suite('interpolation', function() {
+ test('interpolate numbers', function() {
+ assert.equal(interpolate(4, 2, 0.2), 3.6);
+ });
+ test('interpolate bools', function() {
+ assert.equal(interpolate(false, true, 0.4), false);
+ assert.equal(interpolate(false, true, 0.5), true);
+ assert.equal(interpolate(false, true, 0.5), true);
+ });
+ test('interpolate lists', function() {
+ assert.deepEqual(interpolate([1, 2, 3], [4, 5, 6], 0.5), [2.5, 3.5, 4.5]);
+ assert.deepEqual(interpolate([1], [4], 0.6), [2.8]);
+ assert.deepEqual(interpolate([false], [true], 0.6), [true]);
+ assert.deepEqual(interpolate([1, false, [3, 6]], [4, true, [6, 8]], 0.6), [2.8, true, [4.8, 7.2]]);
+ });
+});

Powered by Google App Engine
This is Rietveld 408576698