diff --git a/lib/FrameManager.js b/lib/FrameManager.js index 196cad15..031fc71d 100644 --- a/lib/FrameManager.js +++ b/lib/FrameManager.js @@ -1201,6 +1201,7 @@ class LifecycleWatcher { this._terminationPromise = new Promise(fulfill => { this._terminationCallback = fulfill; }); + this._checkLifecycleComplete(); } /** diff --git a/test/page.spec.js b/test/page.spec.js index 5ba42156..8cc9557c 100644 --- a/test/page.spec.js +++ b/test/page.spec.js @@ -601,6 +601,10 @@ module.exports.addTests = function({testRunner, expect, headless}) { imgResponse.end(); await contentPromise; }); + it('should work fast enough', async({page, server}) => { + for (let i = 0; i < 20; ++i) + await page.setContent('
yo
'); + }); }); describe('Page.setBypassCSP', function() {