mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
test: ignore favicon requests in the network test for redirects (#12541)
This commit is contained in:
parent
61fc10adfa
commit
73ba7d3825
@ -2456,13 +2456,6 @@
|
||||
"expectations": ["FAIL"],
|
||||
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[network.spec] network Network Events should support redirects",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
"parameters": ["firefox", "webDriverBiDi"],
|
||||
"expectations": ["FAIL"],
|
||||
"comment": "Response completed for the redirect get emitter after the beforeSent (or flushed with the last responseCompleted)"
|
||||
},
|
||||
{
|
||||
"testIdPattern": "[network.spec] network Page.authenticate should allow disable authentication",
|
||||
"platforms": ["darwin", "linux", "win32"],
|
||||
|
@ -599,16 +599,18 @@ describe('network', function () {
|
||||
|
||||
const events: string[] = [];
|
||||
page.on('request', request => {
|
||||
return events.push(`${request.method()} ${request.url()}`);
|
||||
!isFavicon(request) &&
|
||||
events.push(`${request.method()} ${request.url()}`);
|
||||
});
|
||||
page.on('response', response => {
|
||||
return events.push(`${response.status()} ${response.url()}`);
|
||||
!isFavicon(response) &&
|
||||
events.push(`${response.status()} ${response.url()}`);
|
||||
});
|
||||
page.on('requestfinished', request => {
|
||||
return events.push(`DONE ${request.url()}`);
|
||||
!isFavicon(request) && events.push(`DONE ${request.url()}`);
|
||||
});
|
||||
page.on('requestfailed', request => {
|
||||
return events.push(`FAIL ${request.url()}`);
|
||||
!isFavicon(request) && events.push(`FAIL ${request.url()}`);
|
||||
});
|
||||
server.setRedirect('/foo.html', '/empty.html');
|
||||
const FOO_URL = server.PREFIX + '/foo.html';
|
||||
|
Loading…
Reference in New Issue
Block a user