Skip to content

Commit

Permalink
roll(firefox): roll Firefox to r1174 (#4005)
Browse files Browse the repository at this point in the history
The r1174 starts using cross-process frameIds. This
simplifies Juggler a lot, but regresses a rare usecase:
network requests from workers from subframes are attributed
to main frame.

This adds a test to annotate this regression. Note that this
doesn't also work in Chromium.

References #3995
  • Loading branch information
aslushnikov authored Sep 30, 2020
1 parent d658b68 commit a20c0e0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion browsers.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
{
"name": "firefox",
"revision": "1173",
"revision": "1174",
"download": true
},
{
Expand Down
18 changes: 18 additions & 0 deletions test/workers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

import { it, expect } from './fixtures';
import { attachFrame } from './utils';
import type { ConsoleMessage } from '..';

it('Page.workers', async function({page, server}) {
Expand Down Expand Up @@ -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'),
Expand Down

0 comments on commit a20c0e0

Please sign in to comment.