fix(page): use secondary DOMWorld to drive page.select() (#3809)

This patch starts creating secondary DOMWorld for every connected
page and switches `page.select()` to run inside the secondary world.

Fix #3327.
This commit is contained in:
Andrey Lushnikov
2019-01-22 17:55:33 -05:00
committed by GitHub
parent c09835fd70
commit 678b8e85ad
6 changed files with 74 additions and 56 deletions

View File

@@ -956,7 +956,7 @@ module.exports.addTests = function({testRunner, expect, headless}) {
expect(error.message).toContain('Values must be strings');
});
// @see https://github.com/GoogleChrome/puppeteer/issues/3327
xit('should work when re-defining top-level Event class', async({page, server}) => {
it('should work when re-defining top-level Event class', async({page, server}) => {
await page.goto(server.PREFIX + '/input/select.html');
await page.evaluate(() => window.Event = null);
await page.select('select', 'blue');