Assert loaded state

This commit is contained in:
Kevin Sawicki 2017-06-28 13:01:22 -07:00
parent 9f0d2cd39d
commit 6d2a5145c9

View file

@ -995,8 +995,9 @@ describe('chromium feature', function () {
it('opens when loading a pdf resource as top level navigation', function (done) { it('opens when loading a pdf resource as top level navigation', function (done) {
createBrowserWindow({plugins: true}) createBrowserWindow({plugins: true})
ipcMain.once('pdf-loaded', function (event, success) { ipcMain.once('pdf-loaded', function (event, state) {
success ? done() : done(new Error(`Unexpected loading state: ${success}`)) assert.equal(state, 'success')
done()
}) })
w.webContents.on('page-title-updated', function () { w.webContents.on('page-title-updated', function () {
const parsedURL = url.parse(w.webContents.getURL(), true) const parsedURL = url.parse(w.webContents.getURL(), true)