fix: disable PaintHolding to be able to click in oopifs (#28604)

Fixes https://github.com/microsoft/playwright/issues/28023
This commit is contained in:
Yury Semikhatsky 2023-12-12 12:20:44 -08:00 committed by GitHub
parent af5a23e55f
commit 66e056c306
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View file

@ -35,7 +35,8 @@ export const chromiumSwitches = [
// AvoidUnnecessaryBeforeUnloadCheckSync - https://github.com/microsoft/playwright/issues/14047
// Translate - https://github.com/microsoft/playwright/issues/16126
// HttpsUpgrades - https://github.com/microsoft/playwright/pull/27605
'--disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate,HttpsUpgrades',
// PaintHolding - https://github.com/microsoft/playwright/issues/28023
'--disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate,HttpsUpgrades,PaintHolding',
'--allow-pre-commit-input',
'--disable-hang-monitor',
'--disable-ipc-flooding-protection',

View file

@ -327,6 +327,20 @@ it('should emit filechooser event for iframe', async ({ page, server, browser })
expect(chooser).toBeTruthy();
});
it('should be able to click in iframe', async ({ page, server, browser }) => {
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/28023' });
await page.goto(server.PREFIX + '/dynamic-oopif.html');
expect(await countOOPIFs(browser)).toBe(1);
expect(page.frames().length).toBe(2);
const frame = page.frames()[1];
await frame.setContent(`<button onclick="console.log('clicked')">OK</button>`);
const [message] = await Promise.all([
page.waitForEvent('console'),
frame.click('button'),
]);
expect(message.text()).toBe('clicked');
});
it('should not throw on exposeFunction when oopif detaches', async ({ page, browser, server }) => {
await page.goto(server.PREFIX + '/dynamic-oopif.html');
expect(await countOOPIFs(browser)).toBe(1);