Skip to content

Commit

Permalink
fix(page): fix repetitative setContent calls (#3666)
Browse files Browse the repository at this point in the history
Fix #3665.
  • Loading branch information
aslushnikov committed Dec 13, 2018
1 parent 8aaca4e commit 3d82465
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/FrameManager.js
Expand Up @@ -1201,6 +1201,7 @@ class LifecycleWatcher {
this._terminationPromise = new Promise(fulfill => {
this._terminationCallback = fulfill;
});
this._checkLifecycleComplete();
}

/**
Expand Down
4 changes: 4 additions & 0 deletions test/page.spec.js
Expand Up @@ -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() {
Expand Down

0 comments on commit 3d82465

Please sign in to comment.