From ba89603b08e8b1a89c5b4c81733843f15d8d43e5 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Wed, 31 Mar 2021 06:53:20 +0200 Subject: [PATCH] test: add test for new RTCPeerConnection() (#6013) --- test/page-goto.spec.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/test/page-goto.spec.ts b/test/page-goto.spec.ts index 55d115a80d..e4b26875d2 100644 --- a/test/page-goto.spec.ts +++ b/test/page-goto.spec.ts @@ -499,3 +499,28 @@ it('should not throw unhandled rejections on invalid url', async ({page, server} const e = await page.goto('https://www.youtube Panel Title.com/').catch(e => e); expect(e.toString()).toContain('Panel Title'); }); + +it('should not crash when RTCPeerConnection is used',(test, { browserName }) => { + test.fail(browserName === 'webkit'); +}, async ({ page, server }) => { + server.setRoute('/rtc.html', (_, res) => { + res.end(` + + + + + + +`); + }); + await page.goto(server.PREFIX + '/rtc.html'); + await page.evaluate(() => { + new window.RTCPeerConnection({ + iceServers: [] + }); + }); +});