From fc54f1937af96575e3c3a0ea9f00c106253ab415 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Wed, 13 Oct 2021 12:10:09 -0700 Subject: [PATCH] test: ipv6 proxy address (#9457) --- tests/browsercontext-proxy.spec.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/browsercontext-proxy.spec.ts b/tests/browsercontext-proxy.spec.ts index 142c1d33fa..879821475a 100644 --- a/tests/browsercontext-proxy.spec.ts +++ b/tests/browsercontext-proxy.spec.ts @@ -86,6 +86,19 @@ it('should use proxy', async ({ contextFactory, server, proxyServer }) => { 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 }) => { proxyServer.forwardTo(server.PORT); const context = await contextFactory({