OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <!-- | |
3 Tests that requestAnimationFrame runs on the compositor worker. | |
4 --> | |
5 <script> | |
6 window.jsTestIsAsync = true; | |
jbroman
2016/04/20 19:24:51
This needn't be in a script tag above js-test.js.
flackr
2016/04/25 14:06:27
Done, thanks for the test pointers - it looks much
| |
7 </script> | |
8 <script src="../../../../resources/js-test.js"></script> | |
9 <script> | |
10 if (window.testRunner) | |
11 testRunner.dumpAsText(true); | |
12 if (window.internals) { | |
13 internals.settings.setCompositorWorkerEnabled(true); | |
14 } | |
15 | |
16 var cw; | |
17 onload = function() { | |
jbroman
2016/04/20 19:24:50
Do you need to wait for onload? If so, why?
flackr
2016/04/25 14:06:27
No, removed.
| |
18 cw = new CompositorWorker('resources/request-animation-frame.js'); | |
19 cw.onmessage = finishTest; | |
20 cw.postMessage(''); | |
21 } | |
22 | |
23 function finishTest(e) { | |
24 document.getElementById('result').textContent = e.data; | |
25 if (window.testRunner) | |
jbroman
2016/04/20 19:24:50
It's weird to use the js-test way of marking the t
flackr
2016/04/25 14:06:27
Done. I also made it record the time before raf wa
| |
26 testRunner.notifyDone(); | |
27 } | |
28 </script> | |
29 <div id="result"></div> | |
OLD | NEW |