Skip to content

Commit c72a253

Browse files
authored
cherry-pick(#33110): fix(chromium): disable PlzDedicatedWorker again (#33113)
1 parent 3d7ef3c commit c72a253

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

packages/playwright-core/src/server/chromium/chromiumSwitches.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ export const chromiumSwitches = [
3737
// PaintHolding - https://github.com/microsoft/playwright/issues/28023
3838
// ThirdPartyStoragePartitioning - https://github.com/microsoft/playwright/issues/32230
3939
// LensOverlay - Hides the Lens feature in the URL address bar. Its not working in unofficial builds.
40-
'--disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate,HttpsUpgrades,PaintHolding,ThirdPartyStoragePartitioning,LensOverlay',
40+
// PlzDedicatedWorker - https://github.com/microsoft/playwright/issues/31747
41+
'--disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate,HttpsUpgrades,PaintHolding,ThirdPartyStoragePartitioning,LensOverlay,PlzDedicatedWorker',
4142
'--allow-pre-commit-input',
4243
'--disable-hang-monitor',
4344
'--disable-ipc-flooding-protection',

tests/page/interception.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,10 @@ it('should intercept network activity from worker', async function({ page, serve
123123

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

130131
await page.goto(server.EMPTY_PAGE);
131132
server.setRoute('/data_for_worker', (req, res) => res.end('failed to intercept'));

tests/page/workers.spec.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ it('should report network activity', async function({ page, server, browserName,
167167

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

184+
it('should report worker script as network request', {
185+
annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/33107' },
186+
}, async function({ page, server }) {
187+
await page.goto(server.EMPTY_PAGE);
188+
const [request1, request2] = await Promise.all([
189+
page.waitForEvent('request', r => r.url().includes('worker.js')),
190+
page.waitForEvent('requestfinished', r => r.url().includes('worker.js')),
191+
page.evaluate(() => (window as any).w = new Worker('/worker/worker.js')),
192+
]);
193+
expect.soft(request1.url()).toBe(server.PREFIX + '/worker/worker.js');
194+
expect.soft(request1).toBe(request2);
195+
});
196+
185197
it('should dispatch console messages when page has workers', async function({ page, server }) {
186198
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/15550' });
187199
await page.goto(server.EMPTY_PAGE);

0 commit comments

Comments
 (0)