From f8d0ed0861475e0b42ab654c76ca2d20c9fc9696 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Fri, 26 Jul 2024 08:19:40 +0200 Subject: [PATCH] make tests green --- tests/library/client-certificates.spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/library/client-certificates.spec.ts b/tests/library/client-certificates.spec.ts index 8fa48d3004..9f055a678b 100644 --- a/tests/library/client-certificates.spec.ts +++ b/tests/library/client-certificates.spec.ts @@ -280,7 +280,8 @@ test.describe('browser', () => { test('support http2', async ({ browser, startCCServer, asset, browserName }) => { test.skip(browserName === 'webkit' && process.platform === 'darwin', 'WebKit on macOS doesn\n proxy localhost'); - const serverURL = await startCCServer({ http2: true }); + const enableHTTP1FallbackWhenUsingHttp2 = browserName === 'webkit' && process.platform === 'linux'; + const serverURL = await startCCServer({ http2: true, enableHTTP1FallbackWhenUsingHttp2 }); const page = await browser.newPage({ clientCertificates: [{ origin: new URL(serverURL).origin, @@ -290,7 +291,7 @@ test.describe('browser', () => { }); // TODO: We should investigate why http2 is not supported in WebKit on Linux. // https://bugs.webkit.org/show_bug.cgi?id=276990 - const expectedProtocol = browserName === 'webkit' && process.platform === 'linux' ? 'http/1.1' : 'h2'; + const expectedProtocol = enableHTTP1FallbackWhenUsingHttp2 ? 'http/1.1' : 'h2'; { await page.goto(serverURL.replace('localhost', 'local.playwright')); await expect(page.getByTestId('message')).toHaveText('Sorry, but you need to provide a client certificate to continue.');