fix(page): fix repetitative setContent calls (#3666)

Fix #3665.
This commit is contained in:
Andrey Lushnikov 2018-12-13 13:33:42 -08:00 committed by GitHub
parent 8aaca4eb1e
commit 3d82465f66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -1201,6 +1201,7 @@ class LifecycleWatcher {
this._terminationPromise = new Promise(fulfill => {
this._terminationCallback = fulfill;
});
this._checkLifecycleComplete();
}
/**

View File

@ -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('<div>yo</div>');
});
});
describe('Page.setBypassCSP', function() {