Add web-contents-created event spec
This commit is contained in:
parent
88a81ef946
commit
d160be5daa
1 changed files with 12 additions and 1 deletions
|
@ -275,7 +275,18 @@ describe('app module', function () {
|
||||||
w = new BrowserWindow({
|
w = new BrowserWindow({
|
||||||
show: false
|
show: false
|
||||||
})
|
})
|
||||||
w.emit('blur')
|
})
|
||||||
|
|
||||||
|
it('should emit web-contents-created event when a webContents is created', function (done) {
|
||||||
|
app.once('web-contents-created', function (e, webContents) {
|
||||||
|
setImmediate(function () {
|
||||||
|
assert.equal(w.webContents.id, webContents.id)
|
||||||
|
done()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
w = new BrowserWindow({
|
||||||
|
show: false
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue