From ba2576c5b97b0c7ad78852c269a3ac55ca21dd97 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Thu, 21 Oct 2021 16:59:33 +0200 Subject: [PATCH] test: page.content() hangs when there is no iframe src (#9674) --- tests/page/page-set-content.spec.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/page/page-set-content.spec.ts b/tests/page/page-set-content.spec.ts index d75785e027..10ca5aa281 100644 --- a/tests/page/page-set-content.spec.ts +++ b/tests/page/page-set-content.spec.ts @@ -116,3 +116,10 @@ it('content() should throw nice error during navigation', async ({ page, server expect(contentOrError?.message).toContain('Unable to retrieve content because the page is navigating and changing the content.'); } }); + +it('should return empty content there is no iframe src', async ({ page, browserName }) => { + it.fixme(browserName === 'firefox' || browserName === 'chromium', 'Hangs in FF && CR because there is no utility context'); + await page.setContent(``); + expect(page.frames().length).toBe(2); + expect(await page.frames()[1].content()).toBe(''); +});