Close windows instead of destroying them

This commit is contained in:
Kevin Sawicki 2016-08-03 12:47:53 -07:00
parent cce6be1900
commit 0ebe142b2f
10 changed files with 45 additions and 62 deletions

View file

@ -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()
})
})
})