| <script src="../resources/js-test-pre.js"></script> |
| testFailed("Some of the multiple requestAnimationFrame() callbacks, which were fired at the same time, received different timestamps."); |
| testPassed("All the multiple requestAnimationFrame() callbacks, which were fired at the same time, received the same timestamp."); |
| function doAnimation1(timestamp) |
| if (currentFrame == MaxFrames) |
| requestAnimationFrame(doAnimation1); |
| requestAnimationFrame(doAnimation2); |
| function doAnimation2(timestamp) |
| if (++currentFrame > WarmupFrames && timestamp != timestamp1) { |
| testFailed("timestamp1 = " + timestamp1 + ", timestamp2 = " + timestamp2 + ", window.performance.now() = " + window.performance.now()); |
| window.jsTestIsAsync = true; |
| requestAnimationFrame(doAnimation1); |
| <script src="../resources/js-test-post.js"></script> |