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

Side by Side Diff: polymer_0.5.4/bower_components/web-animations-js/test/js/group-constructors.js

Issue 895523005: Added Polymer 0.5.4 (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 years, 10 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
1 suite('group-constructors', function() { 1 suite('group-constructors', function() {
2 setup(function() { 2 setup(function() {
3 document.timeline._players = []; 3 document.timeline._players = [];
4 }); 4 });
5 5
6 function simpleAnimationGroup() { 6 function simpleAnimationGroup() {
7 return new AnimationSequence([ 7 return new AnimationSequence([
8 new Animation(document.body, [], 2000), 8 new Animation(document.body, [], 2000),
9 new AnimationGroup([ 9 new AnimationGroup([
10 new Animation(document.body, [], 2000), 10 new Animation(document.body, [], 2000),
11 new Animation(document.body, [], 1000) 11 new Animation(document.body, [], 1000)
12 ]) 12 ])
13 ]); 13 ]);
14 } 14 }
15 15
16 test('player getter for children in groups, and __internalPlayer, work as expe cted', function() { 16 test('player getter for children in groups, and __internalPlayer, work as expe cted', function() {
17 var p = document.timeline.play(simpleAnimationGroup()); 17 var p = document.timeline.play(simpleAnimationGroup());
18 tick(0); 18 tick(0);
19 assert.equal(p.source.player, p); 19 assert.equal(p.source.player, p);
20 assert.equal(p._childPlayers[0].source.player, p); 20 assert.equal(p._childPlayers[0].source.player, p);
21 assert.equal(p._childPlayers[1].source.player, p); 21 assert.equal(p._childPlayers[1].source.player, p);
22 tick(2100); 22 tick(2100);
23 assert.equal(p._childPlayers[1]._childPlayers[0].source.player, p); 23 assert.equal(p._childPlayers[1]._childPlayers[0].source.player, p);
24 assert.equal(p._childPlayers[1]._childPlayers[1].source.player, p); 24 assert.equal(p._childPlayers[1]._childPlayers[1].source.player, p);
25 }); 25 });
26 }); 26 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698