mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
@@ -878,8 +878,9 @@ describe('webContents module', () => {
|
||||
}
|
||||
})
|
||||
|
||||
const p = emittedOnce(w.webContents, 'did-finish-load')
|
||||
w.loadURL('about:blank')
|
||||
await emittedOnce(w.webContents, 'did-finish-load')
|
||||
await p
|
||||
|
||||
const filePath = path.join(remote.app.getPath('temp'), 'test.heapsnapshot')
|
||||
|
||||
@@ -909,8 +910,9 @@ describe('webContents module', () => {
|
||||
}
|
||||
})
|
||||
|
||||
const p = emittedOnce(w.webContents, 'did-finish-load')
|
||||
w.loadURL('about:blank')
|
||||
await emittedOnce(w.webContents, 'did-finish-load')
|
||||
await p
|
||||
|
||||
const promise = w.webContents.takeHeapSnapshot('')
|
||||
return expect(promise).to.be.eventually.rejectedWith(Error, 'takeHeapSnapshot failed')
|
||||
|
||||
Reference in New Issue
Block a user