test: use render-process-gone event in tests (#37280)
Co-authored-by: Milan Burda <miburda@microsoft.com>
This commit is contained in:
parent
fdab0799fe
commit
beed240454
3 changed files with 12 additions and 12 deletions
|
@ -2226,8 +2226,8 @@ describe('webContents module', () => {
|
|||
|
||||
describe('crashed event', () => {
|
||||
it('does not crash main process when destroying WebContents in it', (done) => {
|
||||
const contents = (webContents as any).create({ nodeIntegration: true });
|
||||
contents.once('crashed', () => {
|
||||
const contents = (webContents as typeof ElectronInternal.WebContents).create({ nodeIntegration: true });
|
||||
contents.once('render-process-gone', () => {
|
||||
contents.destroy();
|
||||
done();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue