diff --git a/browsers.json b/browsers.json index 17cce0d9d45c0..06395b11690da 100644 --- a/browsers.json +++ b/browsers.json @@ -8,7 +8,7 @@ }, { "name": "firefox", - "revision": "1173", + "revision": "1174", "download": true }, { diff --git a/test/workers.spec.ts b/test/workers.spec.ts index c5c993d90b7ec..df43d5ec9e79f 100644 --- a/test/workers.spec.ts +++ b/test/workers.spec.ts @@ -16,6 +16,7 @@ */ import { it, expect } from './fixtures'; +import { attachFrame } from './utils'; import type { ConsoleMessage } from '..'; it('Page.workers', async function({page, server}) { @@ -106,6 +107,23 @@ it('should clear upon cross-process navigation', async function({server, page}) expect(page.workers().length).toBe(0); }); +it('should attribute network activity for worker inside iframe to the iframe', (test, {browserName}) => { + test.fixme(browserName === 'firefox' || browserName === 'chromium'); +}, async function({page, server}) { + await page.goto(server.PREFIX + '/empty.html'); + const [worker, frame] = await Promise.all([ + page.waitForEvent('worker'), + attachFrame(page, 'frame1', server.PREFIX + '/worker/worker.html'), + ]); + const url = server.PREFIX + '/one-style.css'; + const [request] = await Promise.all([ + page.waitForRequest(url), + worker.evaluate(url => fetch(url).then(response => response.text()).then(console.log), url), + ]); + expect(request.url()).toBe(url); + expect(request.frame()).toBe(frame); +}); + it('should report network activity', async function({page, server}) { const [worker] = await Promise.all([ page.waitForEvent('worker'),