fix(chromium): disable PlzDedicatedWorker again (#33110)

This commit is contained in:
Dmitry Gozman 2024-10-15 02:13:19 -07:00 committed by GitHub
parent 17837e564d
commit 59a50cf596
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 16 additions and 2 deletions

View file

@ -37,7 +37,8 @@ export const chromiumSwitches = [
// PaintHolding - https://github.com/microsoft/playwright/issues/28023 // PaintHolding - https://github.com/microsoft/playwright/issues/28023
// ThirdPartyStoragePartitioning - https://github.com/microsoft/playwright/issues/32230 // ThirdPartyStoragePartitioning - https://github.com/microsoft/playwright/issues/32230
// LensOverlay - Hides the Lens feature in the URL address bar. Its not working in unofficial builds. // 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', '--allow-pre-commit-input',
'--disable-hang-monitor', '--disable-hang-monitor',
'--disable-ipc-flooding-protection', '--disable-ipc-flooding-protection',

View file

@ -126,6 +126,7 @@ it('should intercept worker requests when enabled after worker creation', {
}, async ({ page, server, isAndroid, browserName, browserMajorVersion }) => { }, async ({ page, server, isAndroid, browserName, browserMajorVersion }) => {
it.skip(isAndroid); it.skip(isAndroid);
it.skip(browserName === 'chromium' && browserMajorVersion < 130, 'fixed in Chromium 130'); 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); await page.goto(server.EMPTY_PAGE);
server.setRoute('/data_for_worker', (req, res) => res.end('failed to intercept')); server.setRoute('/data_for_worker', (req, res) => res.end('failed to intercept'));

View file

@ -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('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'); 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); await page.goto(server.EMPTY_PAGE);
const url = server.PREFIX + '/one-style.css'; const url = server.PREFIX + '/one-style.css';
const requestPromise = page.waitForRequest(url); const requestPromise = page.waitForRequest(url);
@ -182,6 +181,19 @@ it('should report network activity on worker creation', async function({ page, s
expect(response.ok()).toBe(true); 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('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' }); it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/15550' });
await page.goto(server.EMPTY_PAGE); await page.goto(server.EMPTY_PAGE);