🎨 Use leave-full-screen event instead of setTimeout()

This commit is contained in:
dharders 2017-06-14 10:50:15 +10:00
parent 265ab45bd7
commit 909344415e

View file

@ -1973,12 +1973,12 @@ describe('BrowserWindow module', function () {
it('should keep window hidden if already in hidden state', function (done) {
w.webContents.once('did-finish-load', function () {
w.setFullScreen(false)
setTimeout(() => {
w.once('leave-full-screen', () => {
assert.equal(w.isVisible(), false)
assert.equal(w.isFullScreen(), false)
done()
}, 1000)
})
w.setFullScreen(false)
})
w.loadURL('about:blank')
})