feat(firefox): response interception after redirects (#8148)

This commit is contained in:
Yury Semikhatsky 2021-08-11 12:48:30 -07:00 committed by GitHub
parent 86b08c92bc
commit 1694b3e90c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -147,7 +147,6 @@ it('should be abortable after interception', async ({page, server, browserName})
});
it('should fulfill after redirects', async ({page, server, browserName}) => {
it.fixme(browserName === 'firefox');
server.setRedirect('/redirect/1.html', '/redirect/2.html');
server.setRedirect('/redirect/2.html', '/empty.html');
const expectedUrls = ['/redirect/1.html', '/redirect/2.html', '/empty.html'].map(s => server.PREFIX + s);
@ -190,7 +189,6 @@ it('should fulfill after redirects', async ({page, server, browserName}) => {
});
it('should fulfill original response after redirects', async ({page, browserName, server}) => {
it.fixme(browserName === 'firefox');
server.setRedirect('/redirect/1.html', '/redirect/2.html');
server.setRedirect('/redirect/2.html', '/title.html');
const expectedUrls = ['/redirect/1.html', '/redirect/2.html', '/title.html'].map(s => server.PREFIX + s);
@ -224,7 +222,6 @@ it('should fulfill original response after redirects', async ({page, browserName
});
it('should abort after redirects', async ({page, browserName, server}) => {
it.fixme(browserName === 'firefox');
server.setRedirect('/redirect/1.html', '/redirect/2.html');
server.setRedirect('/redirect/2.html', '/title.html');
const expectedUrls = ['/redirect/1.html', '/redirect/2.html', '/title.html'].map(s => server.PREFIX + s);
@ -249,8 +246,10 @@ it('should abort after redirects', async ({page, browserName, server}) => {
} catch (e) {
if (browserName === 'webkit')
expect(e.message).toContain('Request intercepted');
else
else if (browserName === 'chromium')
expect(e.message).toContain('ERR_CONNECTION_RESET');
else
expect(e.message).toContain('NS_ERROR_NET_RESET');
}
expect(requestUrls).toEqual(expectedUrls);
expect(responseUrls).toEqual(expectedUrls.slice(0, -1));