OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../../resources/js-test.js"></script> |
| 3 <script> |
| 4 var jsTestIsAsync = true; |
| 5 description('Tests that requestAnimationFrame is invoked with correct timestamp
on CompositorWorker.'); |
| 6 if (window.internals) |
| 7 internals.settings.setCompositorWorkerEnabled(true); |
| 8 |
| 9 var cw = new CompositorWorker('resources/request-animation-frame.js'); |
| 10 var startTime = performance.now(); |
| 11 var rafTime; |
| 12 var endTime; |
| 13 cw.onmessage = function(e) { |
| 14 rafTime = e.data; |
| 15 endTime = performance.now(); |
| 16 shouldBeGreaterThanOrEqual('rafTime', 'startTime'); |
| 17 shouldBeGreaterThanOrEqual('endTime', 'rafTime'); |
| 18 testPassed('Received reply from CompositorWorker.'); |
| 19 finishJSTest(); |
| 20 } |
| 21 </script> |
OLD | NEW |