blob: 27fc1dd3841e8c35a71c5068be3231a2c1f83cd5 [file] [log] [blame]
// To make sure animation events get processed, periodic lifecycle phase runs
// will include rasterization. See
// https://chromium.googlesource.com/chromium/src/+/main/docs/testing/writing_web_tests.md
// for more information.
function setAnimationRequiresRaster() {
if (window.testRunner) {
testRunner.setAnimationRequiresRaster(true);
}
}
function updateAllLifecyclePhasesAndCompositeAsyncThen(callback) {
setTimeout(function() {
if (!window.testRunner) {
callback();
} else {
testRunner.updateAllLifecyclePhasesAndCompositeThen(callback);
}
},0);
}