fix(test-runner-puppeteer): add createBrowserContext
#2587
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I did
While debugging a
requestAnimationFrame
issue (bug coming soon) I discovered that Puppeteer'screateBrowserContext
function is not implemented despite being clearly documented as supported. I added this function and passed it through to Puppeteer, which seems to be sufficient for it to be used correctly.It doesn't look like the existing tests exercise
puppeteerLauncher
options, so I didn't add a test here, however in my local testing this function does appear to be called correctly with both theconfig
andbrowser
and the result is correctly used. I was able to switch Web Test Runner to use an incognito browser with this function.I opted to call this a "fix" because the option is documented to work. However I can also see an argument that this is really a "feature". I'm happy to change that if we feel it is more appropriate.