| <script src="../../resources/js-test-pre.js"></script> |
| description("Tests the timestamps provided to requestAnimationFrame callbacks"); |
| function busyWait(millis) { |
| while (Date.now()-start < millis) {} |
| var firstTimestamp = undefined; |
| window.requestAnimationFrame(function(timestamp) { |
| firstTimestamp = timestamp; |
| shouldBeDefined("firstTimestamp"); |
| var secondTimestamp = undefined; |
| window.requestAnimationFrame(function(timestamp) { |
| secondTimestamp = timestamp; |
| shouldBeDefined("secondTimestamp"); |
| shouldBe("firstTimestamp", "secondTimestamp"); |
| testRunner.displayAndTrackRepaints(); |
| testRunner.waitUntilDone(); |
| shouldBeDefined("firstTimestamp"); |