Update api-browser-window-spec.js
This commit is contained in:
parent
e18cdc185a
commit
0301961c25
1 changed files with 6 additions and 2 deletions
|
@ -1273,8 +1273,12 @@ describe('BrowserWindow module', function () {
|
|||
const initialWebContents = webContents.getAllWebContents().map((i) => i.id)
|
||||
ipcRenderer.send('prevent-next-new-window', w.webContents.id)
|
||||
w.webContents.once('new-window', () => {
|
||||
assert.deepEqual(webContents.getAllWebContents().map((i) => i.id), initialWebContents)
|
||||
done()
|
||||
// We need to give it some time so the windows get properly disposed (at least on OSX).
|
||||
setTimeout(() => {
|
||||
const currentWebContents = webContents.getAllWebContents().map((i) => i.id)
|
||||
assert.deepEqual(currentWebContents, initialWebContents)
|
||||
done()
|
||||
}, 100);
|
||||
})
|
||||
w.loadURL('file://' + path.join(fixtures, 'pages', 'window-open.html'))
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue