Merge pull request #8399 from watilde/feature/fixes-8338

save a fullscreen state when Kiosk mode is called
This commit is contained in:
Kevin Sawicki 2017-01-17 13:03:51 -08:00 committed by GitHub
commit f7bdf5d04e
3 changed files with 41 additions and 1 deletions

View file

@ -1417,6 +1417,42 @@ describe('BrowserWindow module', function () {
})
})
describe('kiosk state', function () {
// Only implemented on macOS.
if (process.platform !== 'darwin') return
it('can be changed with setKiosk method', function () {
w.destroy()
w = new BrowserWindow()
w.setKiosk(true)
assert.equal(w.isKiosk(), true)
w.setKiosk(false)
assert.equal(w.isKiosk(), false)
})
})
describe('fullscreen state', function () {
// Only implemented on macOS.
if (process.platform !== 'darwin') return
it('can be changed with setFullScreen method', function () {
w.destroy()
w = new BrowserWindow()
w.setFullScreen(true)
assert.equal(w.isFullScreen(), true)
w.setFullScreen(false)
assert.equal(w.isFullScreen(), false)
})
it('should not be changed by setKiosk method', function () {
w.setFullScreen(true)
assert.equal(w.isFullScreen(), true)
w.setKiosk(true)
w.setKiosk(false)
assert.equal(w.isFullScreen(), true)
})
})
describe('closable state', function () {
it('can be changed with closable option', function () {
w.destroy()