Add spec for closing from will-navigate listener

This commit is contained in:
Kevin Sawicki 2016-12-21 10:00:27 -08:00
parent 1308f790ad
commit abea1196de
2 changed files with 19 additions and 0 deletions

View file

@ -267,6 +267,16 @@ describe('BrowserWindow module', function () {
})
})
describe('will-navigate event', function () {
it('allows the window to be closed from the event listener', (done) => {
ipcRenderer.send('close-on-will-navigate', w.id)
ipcRenderer.once('closed-on-will-navigate', () => {
done()
})
w.loadURL('file://' + fixtures + '/pages/will-navigate.html')
})
})
describe('BrowserWindow.show()', function () {
if (isCI) {
return