From 8ebf7f389bc4b408fc4fe7a7bad8aa3d3b1a321f Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Wed, 28 Aug 2024 00:16:42 +0000 Subject: [PATCH] Update test expectations --- tests/library/client-certificates.spec.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/library/client-certificates.spec.ts b/tests/library/client-certificates.spec.ts index 807af5154c..75ca2468f7 100644 --- a/tests/library/client-certificates.spec.ts +++ b/tests/library/client-certificates.spec.ts @@ -601,8 +601,7 @@ 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 enableHTTP1FallbackWhenUsingHttp2 = browserName === 'webkit' && process.platform === 'linux'; - const serverURL = await startCCServer({ http2: true, enableHTTP1FallbackWhenUsingHttp2 }); + const serverURL = await startCCServer({ http2: true }); const page = await browser.newPage({ ignoreHTTPSErrors: true, clientCertificates: [{ @@ -611,19 +610,16 @@ test.describe('browser', () => { keyPath: asset('client-certificates/client/trusted/key.pem'), }], }); - // TODO: We should investigate why http2 is not supported in WebKit on Linux. - // https://bugs.webkit.org/show_bug.cgi?id=276990 - 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.'); - await expect(page.getByTestId('alpn-protocol')).toHaveText(expectedProtocol); + await expect(page.getByTestId('alpn-protocol')).toHaveText('h2'); await expect(page.getByTestId('servername')).toHaveText('local.playwright'); } { await page.goto(serverURL); await expect(page.getByTestId('message')).toHaveText('Hello Alice, your certificate was issued by localhost!'); - await expect(page.getByTestId('alpn-protocol')).toHaveText(expectedProtocol); + await expect(page.getByTestId('alpn-protocol')).toHaveText('h2'); } await page.close(); });