mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Add web-contents-created event spec
This commit is contained in:
@@ -275,7 +275,18 @@ describe('app module', function () {
|
||||
w = new BrowserWindow({
|
||||
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
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user