fix: will-attach-webview handler modifying params.instanceId does not break <webview> (#32386)

This commit is contained in:
Milan Burda 2022-01-12 08:41:20 +01:00 committed by GitHub
parent cbe68bdbb8
commit 99ee1fc0eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 34 additions and 16 deletions

View file

@ -1163,6 +1163,14 @@ describe('<webview> tag', function () {
});
});
it('handler modifying params.instanceId does not break <webview>', async () => {
ipcRenderer.send('break-next-will-attach-webview');
await startLoadingWebViewAndWaitForMessage(webview, {
src: `file://${fixtures}/pages/a.html`
});
});
it('supports preventing a webview from being created', async () => {
ipcRenderer.send('prevent-next-will-attach-webview');