Close windows instead of destroying them
This commit is contained in:
parent
cce6be1900
commit
0ebe142b2f
10 changed files with 45 additions and 62 deletions
|
@ -2,6 +2,7 @@ const assert = require('assert')
|
|||
const http = require('http')
|
||||
const path = require('path')
|
||||
const qs = require('querystring')
|
||||
const {closeWindow} = require('./window-helpers')
|
||||
const remote = require('electron').remote
|
||||
const {BrowserWindow, protocol, webContents} = remote
|
||||
|
||||
|
@ -896,11 +897,10 @@ describe('protocol module', function () {
|
|||
|
||||
afterEach(function (done) {
|
||||
protocol.unregisterProtocol(standardScheme, function () {
|
||||
if (w != null) {
|
||||
w.destroy()
|
||||
}
|
||||
w = null
|
||||
done()
|
||||
closeWindow(w).then(function () {
|
||||
w = null
|
||||
done()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue