OLD | NEW |
1 suite('animation-constructor', function() { | 1 suite('animation-constructor', function() { |
2 setup(function() { | 2 setup(function() { |
3 document.timeline.getAnimationPlayers().forEach(function(player) { | 3 document.timeline.getAnimationPlayers().forEach(function(player) { |
4 player.cancel(); | 4 player.cancel(); |
5 }); | 5 }); |
6 }); | 6 }); |
7 | 7 |
8 test('Playing an Animation makes a Player', function() { | 8 test('Playing an Animation makes a Player', function() { |
9 var animation = new Animation(document.body, [], 1000); | 9 var animation = new Animation(document.body, [], 1000); |
10 assert.equal(document.body.getAnimationPlayers().length, 0); | 10 assert.equal(document.body.getAnimationPlayers().length, 0); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // noop | 71 // noop |
72 }, 200); | 72 }, 200); |
73 | 73 |
74 var player = document.timeline.play(animation); | 74 var player = document.timeline.play(animation); |
75 assert.isNotNull(player); | 75 assert.isNotNull(player); |
76 tick(50); | 76 tick(50); |
77 tick(150); | 77 tick(150); |
78 assert.equal(player.currentTime, 100); | 78 assert.equal(player.currentTime, 100); |
79 }); | 79 }); |
80 }); | 80 }); |
OLD | NEW |