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

Unified Diff: polymer_0.5.0/bower_components/web-animations-js/test/js/group-constructors.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, 12 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 side-by-side diff with in-line comments
Download patch
Index: polymer_0.5.0/bower_components/web-animations-js/test/js/group-constructors.js
diff --git a/polymer_0.5.0/bower_components/web-animations-js/test/js/group-constructors.js b/polymer_0.5.0/bower_components/web-animations-js/test/js/group-constructors.js
new file mode 100644
index 0000000000000000000000000000000000000000..ffc8e25592c16b436f2d931f1d76426e26bde0ec
--- /dev/null
+++ b/polymer_0.5.0/bower_components/web-animations-js/test/js/group-constructors.js
@@ -0,0 +1,26 @@
+suite('group-constructors', function() {
+ setup(function() {
+ document.timeline._players = [];
+ });
+
+ function simpleAnimationGroup() {
+ return new AnimationSequence([
+ new Animation(document.body, [], 2000),
+ new AnimationGroup([
+ new Animation(document.body, [], 2000),
+ new Animation(document.body, [], 1000)
+ ])
+ ]);
+ }
+
+ test('player getter for children in groups, and __internalPlayer, work as expected', function() {
+ var p = document.timeline.play(simpleAnimationGroup());
+ tick(0);
+ assert.equal(p.source.player, p);
+ assert.equal(p._childPlayers[0].source.player, p);
+ assert.equal(p._childPlayers[1].source.player, p);
+ tick(2100);
+ assert.equal(p._childPlayers[1]._childPlayers[0].source.player, p);
+ assert.equal(p._childPlayers[1]._childPlayers[1].source.player, p);
+ });
+});

Powered by Google App Engine
This is Rietveld 408576698