spec: loadUrl should not crash in did-fail-provisional-load handler

This commit is contained in:
Cheng Zhao 2016-04-13 19:39:11 +09:00
parent 92882c358a
commit 0a39449694

View file

@ -153,6 +153,14 @@ describe('browser-window module', function () {
})
w.loadURL('file://' + path.join(fixtures, 'api', 'did-fail-load-iframe.html'))
})
it('does not crash in did-fail-provisional-load handler', function (done) {
w.webContents.once('did-fail-provisional-load', function () {
w.loadURL('http://somewhere-that-does-not.exist/')
done()
})
w.loadURL('http://somewhere-that-does-not.exist/')
})
})
describe('BrowserWindow.show()', function () {