Skip to content

Commit 7b3e590

Browse files
dgozmanaslushnikov
andauthored
cherry-pick(#34530): fix(firefox): disable fetch keep-alive for now before a proper fix (#34534)
Co-authored-by: Andrey Lushnikov <[email protected]>
1 parent 19fe83f commit 7b3e590

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

packages/playwright-core/src/server/firefox/ffBrowser.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -435,4 +435,6 @@ function toJugglerProxyOptions(proxy: types.ProxySettings) {
435435

436436
// Prefs for quick fixes that didn't make it to the build.
437437
// Should all be moved to `playwright.cfg`.
438-
const kBandaidFirefoxUserPrefs = {};
438+
const kBandaidFirefoxUserPrefs = {
439+
'dom.fetchKeepalive.enabled': false,
440+
};

tests/page/page-event-request.spec.ts

+13
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,19 @@ it('should fire for fetches', async ({ page, server }) => {
4141
expect(requests.length).toBe(2);
4242
});
4343

44+
it('should fire for fetches with keepalive: true', {
45+
annotation: {
46+
type: 'issue',
47+
description: 'https://github.com/microsoft/playwright/issues/34497'
48+
}
49+
}, async ({ page, server, browserName }) => {
50+
const requests = [];
51+
page.on('request', request => requests.push(request));
52+
await page.goto(server.EMPTY_PAGE);
53+
await page.evaluate(() => fetch('/empty.html', { keepalive: true }));
54+
expect(requests.length).toBe(2);
55+
});
56+
4457
it('should report requests and responses handled by service worker', async ({ page, server, isAndroid, isElectron }) => {
4558
it.fixme(isAndroid);
4659
it.fixme(isElectron);

0 commit comments

Comments
 (0)