test: ipv6 proxy address (#9457)
This commit is contained in:
parent
8b1a887756
commit
fc54f1937a
|
|
@ -86,6 +86,19 @@ it('should use proxy', async ({ contextFactory, server, proxyServer }) => {
|
||||||
await context.close();
|
await context.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should use ipv6 proxy', async ({ contextFactory, server, proxyServer, browserName }) => {
|
||||||
|
it.fail(browserName === 'firefox', 'page.goto: NS_ERROR_UNKNOWN_HOST');
|
||||||
|
proxyServer.forwardTo(server.PORT);
|
||||||
|
const context = await contextFactory({
|
||||||
|
proxy: { server: `[0:0:0:0:0:0:0:1]:${proxyServer.PORT}` }
|
||||||
|
});
|
||||||
|
const page = await context.newPage();
|
||||||
|
await page.goto('http://non-existent.com/target.html');
|
||||||
|
expect(proxyServer.requestUrls).toContain('http://non-existent.com/target.html');
|
||||||
|
expect(await page.title()).toBe('Served by the proxy');
|
||||||
|
await context.close();
|
||||||
|
});
|
||||||
|
|
||||||
it('should use proxy twice', async ({ contextFactory, server, proxyServer }) => {
|
it('should use proxy twice', async ({ contextFactory, server, proxyServer }) => {
|
||||||
proxyServer.forwardTo(server.PORT);
|
proxyServer.forwardTo(server.PORT);
|
||||||
const context = await contextFactory({
|
const context = await contextFactory({
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue