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,14 +1474,20 @@ describe('BrowserWindow module', function () {
|
|||
// Only implemented on macOS.
|
||||
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 = new BrowserWindow()
|
||||
w.setKiosk(true)
|
||||
assert.equal(w.isKiosk(), true)
|
||||
|
||||
w.once('enter-full-screen', () => {
|
||||
w.setKiosk(false)
|
||||
assert.equal(w.isKiosk(), false)
|
||||
})
|
||||
w.once('leave-full-screen', () => {
|
||||
done()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('fullscreen state', function () {
|
||||
|
|
Loading…
Reference in a new issue