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) {
createBrowserWindow({plugins: true})
ipcMain.once('pdf-loaded', function (event, success) {
success ? done() : done(new Error(`Unexpected loading state: ${success}`))
ipcMain.once('pdf-loaded', function (event, state) {
assert.equal(state, 'success')
done()
})
w.webContents.on('page-title-updated', function () {
const parsedURL = url.parse(w.webContents.getURL(), true)