Skip to content

Commit

Permalink
Merge pull request web-platform-tests#13 from alancutter/documentTime…
Browse files Browse the repository at this point in the history
…line

Upstream timeline-time.html from Blink
  • Loading branch information
suzyh authored Jul 18, 2016
2 parents 5b55e54 + d8deb5c commit dbdd8d1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions web-animations/interfaces/AnimationTimeline/document-timeline.html
Original file line number Diff line number Diff line change
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 dbdd8d1

Please sign in to comment.