| Index: polymer_0.5.0/bower_components/web-animations-js/test/js/timeline.js
|
| diff --git a/polymer_0.5.0/bower_components/web-animations-js/test/js/timeline.js b/polymer_0.5.0/bower_components/web-animations-js/test/js/timeline.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3ddf9bc201e7e781ad929f42819af6dc4a4bfe4b
|
| --- /dev/null
|
| +++ b/polymer_0.5.0/bower_components/web-animations-js/test/js/timeline.js
|
| @@ -0,0 +1,36 @@
|
| +suite('timeline-tests', function() {
|
| + setup(function() {
|
| + document.timeline._players = [];
|
| + webAnimationsMinifill.timeline._players = [];
|
| + });
|
| +
|
| + test('no current players', function() {
|
| + assert.equal(document.timeline.getAnimationPlayers().length, 0);
|
| + });
|
| +
|
| + test('getAnimationPlayers', function() {
|
| + tick(90);
|
| + assert.equal(document.timeline.getAnimationPlayers().length, 0);
|
| + var player = document.body.animate([], {duration: 500, iterations: 1});
|
| + tick(300);
|
| + assert.equal(document.timeline.getAnimationPlayers().length, 1);
|
| +
|
| + var player2 = document.body.animate([], {duration: 1000});
|
| + assert.equal(document.timeline.getAnimationPlayers().length, 2);
|
| + tick(800);
|
| + assert.equal(player.finished, true);
|
| + assert.equal(document.timeline.getAnimationPlayers().length, 1);
|
| + tick(2000);
|
| + assert.equal(document.timeline.getAnimationPlayers().length, 0);
|
| + });
|
| +
|
| + test('getAnimationPlayers checks cancelled animation', function() {
|
| + tick(90);
|
| + assert.equal(document.timeline.getAnimationPlayers().length, 0);
|
| + var player = document.body.animate([], {duration: 500, iterations: 1});
|
| + tick(300);
|
| + assert.equal(document.timeline.getAnimationPlayers().length, 1);
|
| + player.cancel();
|
| + assert.equal(document.timeline.getAnimationPlayers().length, 0);
|
| + });
|
| +});
|
|
|