|
@@ -224,6 +224,12 @@ describe('webContents.setWindowOpenHandler', () => {
|
|
|
|
|
|
browserWindow.webContents.executeJavaScript("window.open('about:blank') && true");
|
|
|
});
|
|
|
+
|
|
|
+ it('does not hang parent window when denying window.open', async () => {
|
|
|
+ browserWindow.webContents.setWindowOpenHandler(() => ({ action: 'deny' }));
|
|
|
+ browserWindow.webContents.executeJavaScript("window.open('https://127.0.0.1')");
|
|
|
+ expect(await browserWindow.webContents.executeJavaScript('42')).to.equal(42);
|
|
|
+ });
|
|
|
});
|
|
|
}
|
|
|
});
|