test: add test for fetch with keepalive: true on Firefox (#34498)

This commit is contained in:
Max Schmitt 2025-01-27 15:39:59 +01:00 committed by GitHub
parent 8d716b28a1
commit bc1a8c2191
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 0 deletions

View File

@ -41,6 +41,20 @@ it('should fire for fetches', async ({ page, server }) => {
expect(requests.length).toBe(2);
});
it('should fire for fetches with keepalive: true', {
annotation: {
type: 'issue',
description: 'https://github.com/microsoft/playwright/issues/34497'
}
}, async ({ page, server, browserName }) => {
it.fixme(browserName === 'firefox');
const requests = [];
page.on('request', request => requests.push(request));
await page.goto(server.EMPTY_PAGE);
await page.evaluate(() => fetch('/empty.html', { keepalive: true }));
expect(requests.length).toBe(2);
});
it('should report requests and responses handled by service worker', async ({ page, server, isAndroid, isElectron }) => {
it.fixme(isAndroid);
it.fixme(isElectron);