Mason Freed | b085562 | 2018-10-02 17:49:47 | [diff] [blame] | 1 | // To make sure animation events get processed, periodic lifecycle phase runs |
| 2 | // will include rasterization. See |
Eric Willigers | 6c58bdb | 2022-01-24 23:06:45 | [diff] [blame] | 3 | // https://chromium.googlesource.com/chromium/src/+/main/docs/testing/writing_web_tests.md |
Mason Freed | b085562 | 2018-10-02 17:49:47 | [diff] [blame] | 4 | // for more information. |
| 5 | function setAnimationRequiresRaster() { |
| 6 | if (window.testRunner) { |
| 7 | testRunner.setAnimationRequiresRaster(true); |
| 8 | } |
| 9 | } |
| 10 | |
| 11 | function updateAllLifecyclePhasesAndCompositeAsyncThen(callback) { |
| 12 | setTimeout(function() { |
| 13 | if (!window.testRunner) { |
| 14 | callback(); |
| 15 | } else { |
| 16 | testRunner.updateAllLifecyclePhasesAndCompositeThen(callback); |
| 17 | } |
| 18 | },0); |
| 19 | } |