OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../resources/runner.js"></script> | 2 <script src="../resources/runner.js"></script> |
3 <pre id="log"></pre> | 3 <pre id="log"></pre> |
4 <script> | 4 <script> |
5 // We discard the first iteration to avoid a cold outlier. | 5 // We discard the first iteration to avoid a cold outlier. |
6 var iterations = 11; | 6 var iterations = 11; |
7 var results = []; | 7 var results = []; |
8 var previousFrameTime = -1; | 8 var previousFrameTime = -1; |
9 var now = function(){ | 9 var now = function(){ |
10 return window.performance ? performance.now() : Date.now(); | 10 return window.performance ? performance.now() : Date.now(); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 ix++; | 53 ix++; |
54 iy++; | 54 iy++; |
55 } | 55 } |
56 | 56 |
57 if (window.testRunner) | 57 if (window.testRunner) |
58 testRunner.waitUntilDone(); | 58 testRunner.waitUntilDone(); |
59 | 59 |
60 // Start the test after two frame to ensure we have set-up, laid out and painted
the table. | 60 // Start the test after two frame to ensure we have set-up, laid out and painted
the table. |
61 window.requestAnimationFrame(function() { window.requestAnimationFrame(toggleBac
kgroundColor) }); | 61 window.requestAnimationFrame(function() { window.requestAnimationFrame(toggleBac
kgroundColor) }); |
62 </script> | 62 </script> |
OLD | NEW |