🎨 Use leave-full-screen event instead of setTimeout()
This commit is contained in:
parent
265ab45bd7
commit
909344415e
1 changed files with 3 additions and 3 deletions
|
@ -1973,12 +1973,12 @@ describe('BrowserWindow module', function () {
|
||||||
|
|
||||||
it('should keep window hidden if already in hidden state', function (done) {
|
it('should keep window hidden if already in hidden state', function (done) {
|
||||||
w.webContents.once('did-finish-load', function () {
|
w.webContents.once('did-finish-load', function () {
|
||||||
w.setFullScreen(false)
|
w.once('leave-full-screen', () => {
|
||||||
setTimeout(() => {
|
|
||||||
assert.equal(w.isVisible(), false)
|
assert.equal(w.isVisible(), false)
|
||||||
assert.equal(w.isFullScreen(), false)
|
assert.equal(w.isFullScreen(), false)
|
||||||
done()
|
done()
|
||||||
}, 1000)
|
})
|
||||||
|
w.setFullScreen(false)
|
||||||
})
|
})
|
||||||
w.loadURL('about:blank')
|
w.loadURL('about:blank')
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue