test: console messages are dispatched when page has workers (#16066)
This commit is contained in:
parent
d33455dcca
commit
d05044f366
|
|
@ -173,3 +173,18 @@ it('should report network activity on worker creation', async function({ page, s
|
|||
expect(response.request()).toBe(request);
|
||||
expect(response.ok()).toBe(true);
|
||||
});
|
||||
|
||||
it('should dispatch console messages when page has workers', async function({ page, browserName, server }) {
|
||||
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/15550' });
|
||||
it.fixme(browserName === 'firefox');
|
||||
await page.goto(server.EMPTY_PAGE);
|
||||
await Promise.all([
|
||||
page.waitForEvent('worker'),
|
||||
page.evaluate(() => new Worker(URL.createObjectURL(new Blob(['const x = 1;'], { type: 'application/javascript' }))))
|
||||
]);
|
||||
const [message] = await Promise.all([
|
||||
page.waitForEvent('console'),
|
||||
page.evaluate(() => console.log('foo'))
|
||||
]);
|
||||
expect(message.text()).toBe('foo');
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue