Skip to content

Commit

Permalink
test: fix a few tests on firefox (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
aslushnikov authored and yury-s committed Dec 17, 2019
1 parent 24eb6d8 commit 0dafabb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/network.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions test/page.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 0dafabb

Please sign in to comment.