Chromium Code Reviews| Index: sky/tests/resources/run-after-display.sky |
| diff --git a/sky/tests/resources/run-after-display.sky b/sky/tests/resources/run-after-display.sky |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d3ee9613c2b5dfe5c2536054bd3e766941ffee51 |
| --- /dev/null |
| +++ b/sky/tests/resources/run-after-display.sky |
| @@ -0,0 +1,11 @@ |
| +<script> |
| +module.exports = function(callback) { |
| + window.requestAnimationFrame(function() { |
| + // At this point, only the animate has happened, but no compositing |
| + // or layout. Use a timeout for the callback so that notifyDone |
| + // can be called inside of it. |
| + // FIXME: we need a better way of waiting for chromium events to happen |
| + window.setTimeout(callback, 1); |
|
abarth-chromium
2015/01/06 22:48:09
Why 1 instead of 0?
ojan
2015/01/06 22:54:41
I just copy-pasted this from the Blink version. I
ojan
2015/01/06 22:54:41
I just copy-pasted this from the Blink version. I
|
| + }); |
| +}; |
| +</script> |