| <script src="../resources/js-test-pre.js"></script> |
| testFailed("Some of the requestAnimationFrame() callback timestamps were larger than Performance.now() by more than 3ms."); |
| testPassed("All the differences between requestAnimationFrame() callback timestamps and Performance.now() were within 3ms.") |
| function doAnimation(timestamp) |
| var performanceNow = window.performance.now(); |
| if (++currentFrame > WarmupFrames && Math.abs(timestamp - performanceNow) >= Tolerance) { |
| debug("requestAnimationFrame() timestamp = " + timestamp + ", window.performance.now() = " + performanceNow); |
| if (currentFrame == MaxFrames) |
| requestAnimationFrame(doAnimation); |
| window.jsTestIsAsync = true; |
| requestAnimationFrame(doAnimation); |
| <script src="../resources/js-test-post.js"></script> |