Wait for full screen event before leaving kiosk mode
This commit is contained in:
parent
5153c1f353
commit
6b13fab83a
1 changed files with 9 additions and 3 deletions
|
@ -1474,13 +1474,19 @@ describe('BrowserWindow module', function () {
|
||||||
// Only implemented on macOS.
|
// Only implemented on macOS.
|
||||||
if (process.platform !== 'darwin') return
|
if (process.platform !== 'darwin') return
|
||||||
|
|
||||||
it('can be changed with setKiosk method', function () {
|
it('can be changed with setKiosk method', function (done) {
|
||||||
w.destroy()
|
w.destroy()
|
||||||
w = new BrowserWindow()
|
w = new BrowserWindow()
|
||||||
w.setKiosk(true)
|
w.setKiosk(true)
|
||||||
assert.equal(w.isKiosk(), true)
|
assert.equal(w.isKiosk(), true)
|
||||||
w.setKiosk(false)
|
|
||||||
assert.equal(w.isKiosk(), false)
|
w.once('enter-full-screen', () => {
|
||||||
|
w.setKiosk(false)
|
||||||
|
assert.equal(w.isKiosk(), false)
|
||||||
|
})
|
||||||
|
w.once('leave-full-screen', () => {
|
||||||
|
done()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue