add tests to fullScreen and Kiosk
This commit is contained in:
parent
436a6d5c0f
commit
b97db68f0c
1 changed files with 36 additions and 0 deletions
|
@ -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 () {
|
describe('closable state', function () {
|
||||||
it('can be changed with closable option', function () {
|
it('can be changed with closable option', function () {
|
||||||
w.destroy()
|
w.destroy()
|
||||||
|
|
Loading…
Reference in a new issue