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

Side by Side Diff: polymer_0.5.4/bower_components/web-animations-js/test/js/effect-callback.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('effect-callback', function() { 1 suite('effect-callback', 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('animations starting in the future are not in effect', function() { 7 test('animations starting in the future are not in effect', function() {
8 var fractions = []; 8 var fractions = [];
9 tick(100); 9 tick(100);
10 var player = document.body.animate(function(fraction) { fractions.push(fract ion); }, 1000); 10 var player = document.body.animate(function(fraction) { fractions.push(fract ion); }, 1000);
11 player.startTime = 1000; 11 player.startTime = 1000;
12 tick(200); 12 tick(200);
13 tick(1000); 13 tick(1000);
14 tick(1100); 14 tick(1100);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 var anim = new Animation(document.body, function(t, target, a) { 67 var anim = new Animation(document.body, function(t, target, a) {
68 callbackAnim = a; 68 callbackAnim = a;
69 }, 1000); 69 }, 1000);
70 var player = document.timeline.play(anim); 70 var player = document.timeline.play(anim);
71 tick(50); 71 tick(50);
72 tick(550); 72 tick(550);
73 assert.equal(player.currentTime, 500); 73 assert.equal(player.currentTime, 500);
74 assert.equal(callbackAnim, anim); 74 assert.equal(callbackAnim, anim);
75 }); 75 });
76 }); 76 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698