test: fix a few tests on firefox (#279)

This commit is contained in:
Andrey Lushnikov 2019-12-17 12:33:05 -08:00 committed by Yury Semikhatsky
parent 24eb6d8671
commit 0dafabb05e
2 changed files with 3 additions and 4 deletions

View File

@ -221,7 +221,7 @@ module.exports.addTests = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {
// FIXME: WebKit doesn't provide remoteIPAddress in the response.
it.skip(WEBKIT)('Page.Events.Response', async({page, server}) => {
const responses = [];
page.on('response', response => responses.push(response));
page.on('response', response => !utils.isFavicon(response.request()) && responses.push(response));
await page.goto(server.EMPTY_PAGE);
expect(responses.length).toBe(1);
expect(responses[0].url()).toBe(server.EMPTY_PAGE);
@ -260,7 +260,7 @@ module.exports.addTests = function({testRunner, expect, FFOX, CHROME, WEBKIT}) {
});
it('Page.Events.RequestFinished', async({page, server}) => {
const requests = [];
page.on('requestfinished', request => requests.push(request));
page.on('requestfinished', request => !utils.isFavicon(request) && requests.push(request));
await page.goto(server.EMPTY_PAGE);
expect(requests.length).toBe(1);
expect(requests[0].url()).toBe(server.EMPTY_PAGE);

View File

@ -100,7 +100,6 @@ module.exports.addTests = function({testRunner, expect, headless, playwright, FF
describe('Async stacks', () => {
it('should work', async({page, server}) => {
server.setRoute('/empty.html', (req, res) => {
req.socket.write('deadbeef');
req.socket.end();
});
let error = null;
@ -178,7 +177,7 @@ module.exports.addTests = function({testRunner, expect, headless, playwright, FF
page.on('popup', () => badSecondPopup = true);
await popup.goto(server.CROSS_PROCESS_PREFIX + '/empty.html');
expect(badSecondPopup).toBe(false);
})
});
});
describe('Page.Events.Console', function() {