test: page.content() hangs when there is no iframe src (#9674)
This commit is contained in:
parent
fb69ff30a9
commit
ba2576c5b9
|
|
@ -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(`<iframe src="javascript:console.log(1)"></iframe>`);
|
||||
expect(page.frames().length).toBe(2);
|
||||
expect(await page.frames()[1].content()).toBe('<html><head></head><body></body></html>');
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue