mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix(firefox): report more console messages (including warnings) (#4005)
This commit is contained in:
@@ -333,14 +333,17 @@ module.exports.addTests = function({testRunner, expect, headless, Errors, Device
|
||||
]);
|
||||
expect(message.text()).toBe('JSHandle@object');
|
||||
});
|
||||
it_fails_ffox('should trigger correct Log', async({page, server}) => {
|
||||
it('should trigger correct Log', async({page, server}) => {
|
||||
await page.goto('about:blank');
|
||||
const [message] = await Promise.all([
|
||||
waitEvent(page, 'console'),
|
||||
page.evaluate(async url => fetch(url).catch(e => {}), server.EMPTY_PAGE)
|
||||
]);
|
||||
expect(message.text()).toContain('No \'Access-Control-Allow-Origin\'');
|
||||
expect(message.type()).toEqual('error');
|
||||
expect(message.text()).toContain('Access-Control-Allow-Origin');
|
||||
if (CHROME)
|
||||
expect(message.type()).toEqual('error');
|
||||
else
|
||||
expect(message.type()).toEqual('warn');
|
||||
});
|
||||
it_fails_ffox('should have location when fetch fails', async({page, server}) => {
|
||||
await page.goto(server.EMPTY_PAGE);
|
||||
|
||||
Reference in New Issue
Block a user