Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
fix(chromium): disable PlzDedicatedWorker again (#33110)
Dmitry Gozman59a50cf59603
diff --git a/packages/playwright-core/src/server/chromium/chromiumSwitches.ts b/packages/playwright-core/src/server/chromium/chromiumSwitches.tsindex 01df7a66ac..4774c13ed7 100644--- a/packages/playwright-core/src/server/chromium/chromiumSwitches.ts+++ b/packages/playwright-core/src/server/chromium/chromiumSwitches.ts@@ -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',diff --git a/tests/page/interception.spec.ts b/tests/page/interception.spec.tsindex 9447a80fcd..eef67e8b37 100644--- a/tests/page/interception.spec.ts+++ b/tests/page/interception.spec.ts@@ -126,6 +126,7 @@ it('should intercept worker requests when enabled after worker creation', {}, async ({ page, server, isAndroid, browserName, browserMajorVersion }) => {it.skip(isAndroid);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'));diff --git a/tests/page/workers.spec.ts b/tests/page/workers.spec.tsindex 327a2ed45d..3ca56a6866 100644--- a/tests/page/workers.spec.ts+++ b/tests/page/workers.spec.ts@@ -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);@@ -182,6 +181,19 @@ it('should report network activity on worker creation', async function({ page, sexpect(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);