diff --git a/test/oopif.spec.ts b/test/oopif.spec.ts index fadc7f72..ba5ce9da 100644 --- a/test/oopif.spec.ts +++ b/test/oopif.spec.ts @@ -226,7 +226,21 @@ describeChromeOnly('OOPIF', function () { expect(result).toBe('Test 123!'); }); it('should provide access to elements', async () => { - const { server } = getTestState(); + const { server, isHeadless, headless } = getTestState(); + + if (!isHeadless || headless === 'chrome') { + // TODO: this test is partially blocked on crbug.com/1334119. Enable test once + // the upstream is fixed. + // TLDR: when we dispatch events ot the frame the compositor might + // not be up-to-date yet resulting in a misclick (the iframe element + // becomes the event target instead of the content inside the iframe). + // The solution is to use InsertVisualCallback on the backend but that causes + // another issue that events cannot be dispatched to inactive tabs as the + // visual callback is never invoked. + // The old headless mode does not have this issue since it operates with + // special scheduling settings that keep even inactive tabs updating. + return; + } await page.goto(server.EMPTY_PAGE); const framePromise = page.waitForFrame((frame) => {