diff --git a/tests/page/page-goto.spec.ts b/tests/page/page-goto.spec.ts index c096d1529915f..1e7194e7c6f47 100644 --- a/tests/page/page-goto.spec.ts +++ b/tests/page/page-goto.spec.ts @@ -123,6 +123,27 @@ it('should work with Cross-Origin-Opener-Policy', async ({ page, server }) => { expect(response.request().failure()).toBeNull(); }); +for (const crossOriginEmbedderPolicy of [undefined, 'require-corp']) { + it(`should work with Cross-Origin-Opener-Policy${crossOriginEmbedderPolicy ? ' and Cross-Origin-Embedder-Policy' : ''} and history state`, async ({ page, server }) => { + it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/42731' }); + server.setRoute('/empty.html', (req, res) => { + res.setHeader('Cross-Origin-Opener-Policy', 'same-origin'); + if (crossOriginEmbedderPolicy) + res.setHeader('Cross-Origin-Embedder-Policy', crossOriginEmbedderPolicy); + res.end(` + +