Skip to content

Commit

Permalink
Upstream timeline-time.html from Blink (#3340)
Browse files Browse the repository at this point in the history
  • Loading branch information
suzyh authored and birtles committed Mar 17, 2017
1 parent 06f938b commit 58a942f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions web-animations/interfaces/AnimationTimeline/document-timeline.html
Expand Up @@ -56,4 +56,23 @@
}));
}, 'document.timeline.currentTime liveness tests');

async_test(function(t) {
var startTime = document.timeline.currentTime;
var firstRafTime;

requestAnimationFrame(function() {
t.step(function() {
assert_greater_than_equal(document.timeline.currentTime, startTime, 'currentTime should have progressed');
firstRafTime = document.timeline.currentTime;
});
});

requestAnimationFrame(function() {
t.step(function() {
assert_equals(document.timeline.currentTime, firstRafTime, 'currentTime should be the same');
});
t.done();
});
}, 'document.timeline.currentTime time should be the same for all RAF callbacks in a frame');

</script>

0 comments on commit 58a942f

Please sign in to comment.