From 42523963050531a7b50503d3240472df7046842c Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Wed, 21 Aug 2024 23:51:29 +0200 Subject: [PATCH] fixes --- tests/library/client-certificates.spec.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/library/client-certificates.spec.ts b/tests/library/client-certificates.spec.ts index 146dfa090c..4922119ee7 100644 --- a/tests/library/client-certificates.spec.ts +++ b/tests/library/client-certificates.spec.ts @@ -402,11 +402,11 @@ test.describe('browser', () => { }); }); if (req.url === '/') { - res.writeHead(200, { 'Content-Type': 'text/html' }); + res.writeHead(200, { 'Content-Type': 'text/html', 'connection': 'close' }); res.end(); } else if (req.url === '/from-fetch-api') { res.writeHead(200, { - 'Content-Type': 'text/html; charset=UTF-8', + 'Content-Type': 'text/plain', 'Transfer-Encoding': 'chunked' }); @@ -492,9 +492,11 @@ test.describe('browser', () => { await test.step('Gzip encoded CSS Stylesheet', async () => { await page.goto(serverUrl); - await page.setContent(''); - // This would throw with net::ERR_INVALID_CHUNKED_ENCODING - await page.addStyleTag({ url: `${serverUrl}/style.css` }); + // The would throw with net::ERR_INVALID_CHUNKED_ENCODING + await page.setContent(` + + + `); await expect(page.locator('button')).toHaveCSS('background-color', /* red */'rgb(255, 0, 0)'); });