Skip to content

Commit

Permalink
cherry-pick(#33110): fix(chromium): disable PlzDedicatedWorker again (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dgozman authored Oct 15, 2024
1 parent 3d7ef3c commit c72a253
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export const chromiumSwitches = [
// PaintHolding - https://github.com/microsoft/playwright/issues/28023
// ThirdPartyStoragePartitioning - https://github.com/microsoft/playwright/issues/32230
// LensOverlay - Hides the Lens feature in the URL address bar. Its not working in unofficial builds.
'--disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate,HttpsUpgrades,PaintHolding,ThirdPartyStoragePartitioning,LensOverlay',
// PlzDedicatedWorker - https://github.com/microsoft/playwright/issues/31747
'--disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate,HttpsUpgrades,PaintHolding,ThirdPartyStoragePartitioning,LensOverlay,PlzDedicatedWorker',
'--allow-pre-commit-input',
'--disable-hang-monitor',
'--disable-ipc-flooding-protection',
Expand Down
5 changes: 3 additions & 2 deletions tests/page/interception.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,10 @@ it('should intercept network activity from worker', async function({ page, serve

it('should intercept worker requests when enabled after worker creation', {
annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/32355' }
}, async ({ page, server, isAndroid, browserName }) => {
}, async ({ page, server, isAndroid, browserName, browserMajorVersion }) => {
it.skip(isAndroid);
it.fixme(browserName === 'chromium');
it.skip(browserName === 'chromium' && browserMajorVersion < 130, 'fixed in Chromium 130');
it.fixme(browserName === 'chromium', 'requires PlzDedicatedWorker to be enabled');

await page.goto(server.EMPTY_PAGE);
server.setRoute('/data_for_worker', (req, res) => res.end('failed to intercept'));
Expand Down
14 changes: 13 additions & 1 deletion tests/page/workers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ it('should report network activity', async function({ page, server, browserName,

it('should report network activity on worker creation', async function({ page, server, browserName, browserMajorVersion }) {
it.skip(browserName === 'firefox' && browserMajorVersion < 114, 'https://github.com/microsoft/playwright/issues/21760');
// Chromium needs waitForDebugger enabled for this one.
await page.goto(server.EMPTY_PAGE);
const url = server.PREFIX + '/one-style.css';
const requestPromise = page.waitForRequest(url);
Expand All @@ -182,6 +181,19 @@ it('should report network activity on worker creation', async function({ page, s
expect(response.ok()).toBe(true);
});

it('should report worker script as network request', {
annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/33107' },
}, async function({ page, server }) {
await page.goto(server.EMPTY_PAGE);
const [request1, request2] = await Promise.all([
page.waitForEvent('request', r => r.url().includes('worker.js')),
page.waitForEvent('requestfinished', r => r.url().includes('worker.js')),
page.evaluate(() => (window as any).w = new Worker('/worker/worker.js')),
]);
expect.soft(request1.url()).toBe(server.PREFIX + '/worker/worker.js');
expect.soft(request1).toBe(request2);
});

it('should dispatch console messages when page has workers', async function({ page, server }) {
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/15550' });
await page.goto(server.EMPTY_PAGE);
Expand Down

0 comments on commit c72a253

Please sign in to comment.