| OLD | NEW |
| 1 suite('timeline-tests', function() { | 1 suite('timeline-tests', function() { |
| 2 setup(function() { | 2 setup(function() { |
| 3 document.timeline._players = []; | 3 document.timeline._players = []; |
| 4 webAnimationsMinifill.timeline._players = []; | 4 webAnimations1.timeline._players = []; |
| 5 }); | 5 }); |
| 6 | 6 |
| 7 test('no current players', function() { | 7 test('no current players', function() { |
| 8 assert.equal(document.timeline.getAnimationPlayers().length, 0); | 8 assert.equal(document.timeline.getAnimationPlayers().length, 0); |
| 9 }); | 9 }); |
| 10 | 10 |
| 11 test('getAnimationPlayers', function() { | 11 test('getAnimationPlayers', function() { |
| 12 tick(90); | 12 tick(90); |
| 13 assert.equal(document.timeline.getAnimationPlayers().length, 0); | 13 assert.equal(document.timeline.getAnimationPlayers().length, 0); |
| 14 var player = document.body.animate([], {duration: 500, iterations: 1}); | 14 var player = document.body.animate([], {duration: 500, iterations: 1}); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 27 test('getAnimationPlayers checks cancelled animation', function() { | 27 test('getAnimationPlayers checks cancelled animation', function() { |
| 28 tick(90); | 28 tick(90); |
| 29 assert.equal(document.timeline.getAnimationPlayers().length, 0); | 29 assert.equal(document.timeline.getAnimationPlayers().length, 0); |
| 30 var player = document.body.animate([], {duration: 500, iterations: 1}); | 30 var player = document.body.animate([], {duration: 500, iterations: 1}); |
| 31 tick(300); | 31 tick(300); |
| 32 assert.equal(document.timeline.getAnimationPlayers().length, 1); | 32 assert.equal(document.timeline.getAnimationPlayers().length, 1); |
| 33 player.cancel(); | 33 player.cancel(); |
| 34 assert.equal(document.timeline.getAnimationPlayers().length, 0); | 34 assert.equal(document.timeline.getAnimationPlayers().length, 0); |
| 35 }); | 35 }); |
| 36 }); | 36 }); |
| OLD | NEW |