Assert loaded state
This commit is contained in:
parent
9f0d2cd39d
commit
6d2a5145c9
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue