Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tests): background page tests should wait for the page #4769

Merged
merged 1 commit into from Jul 29, 2019

Conversation

JoelEinbinder
Copy link
Collaborator

It tests waitForBackgroundPageTarget(browser) would fail if it ever had to wait for the target. Luckily today we have browser.waitForTarget which makes life easier.

browser.on('targetcreated', function listener(target) {
if (target.type() !== 'background_page')
return;
browser.removeListener(listener);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have been browser.removeListener('targetcreated', listener)

@aslushnikov aslushnikov merged commit 7a60746 into puppeteer:master Jul 29, 2019
rfojtik pushed a commit to rfojtik/puppeteer that referenced this pull request Dec 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants