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

Side by Side Diff: polymer_0.5.0/bower_components/web-animations-js/test/js/timeline.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, 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 unified diff | Download patch
OLDNEW
(Empty)
1 suite('timeline-tests', function() {
2 setup(function() {
3 document.timeline._players = [];
4 webAnimationsMinifill.timeline._players = [];
5 });
6
7 test('no current players', function() {
8 assert.equal(document.timeline.getAnimationPlayers().length, 0);
9 });
10
11 test('getAnimationPlayers', function() {
12 tick(90);
13 assert.equal(document.timeline.getAnimationPlayers().length, 0);
14 var player = document.body.animate([], {duration: 500, iterations: 1});
15 tick(300);
16 assert.equal(document.timeline.getAnimationPlayers().length, 1);
17
18 var player2 = document.body.animate([], {duration: 1000});
19 assert.equal(document.timeline.getAnimationPlayers().length, 2);
20 tick(800);
21 assert.equal(player.finished, true);
22 assert.equal(document.timeline.getAnimationPlayers().length, 1);
23 tick(2000);
24 assert.equal(document.timeline.getAnimationPlayers().length, 0);
25 });
26
27 test('getAnimationPlayers checks cancelled animation', function() {
28 tick(90);
29 assert.equal(document.timeline.getAnimationPlayers().length, 0);
30 var player = document.body.animate([], {duration: 500, iterations: 1});
31 tick(300);
32 assert.equal(document.timeline.getAnimationPlayers().length, 1);
33 player.cancel();
34 assert.equal(document.timeline.getAnimationPlayers().length, 0);
35 });
36 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698