Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/request-animation-frame.html |
| diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/request-animation-frame.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/request-animation-frame.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9b45026844bddfe3bc2ad31a7143a3f4f89467d2 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/request-animation-frame.html |
| @@ -0,0 +1,29 @@ |
| +<!DOCTYPE html> |
| +<!-- |
| +Tests that requestAnimationFrame runs on the compositor worker. |
| +--> |
| +<script> |
| +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
|
| +</script> |
| +<script src="../../../../resources/js-test.js"></script> |
| +<script> |
| +if (window.testRunner) |
| + testRunner.dumpAsText(true); |
| +if (window.internals) { |
| + internals.settings.setCompositorWorkerEnabled(true); |
| +} |
| + |
| +var cw; |
| +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.
|
| + cw = new CompositorWorker('resources/request-animation-frame.js'); |
| + cw.onmessage = finishTest; |
| + cw.postMessage(''); |
| +} |
| + |
| +function finishTest(e) { |
| + document.getElementById('result').textContent = e.data; |
| + 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
|
| + testRunner.notifyDone(); |
| +} |
| +</script> |
| +<div id="result"></div> |