From b97db68f0c0d25737ecf9f3e5139708dc39b4dc0 Mon Sep 17 00:00:00 2001 From: Daijiro Wachi Date: Sat, 14 Jan 2017 00:05:04 +0100 Subject: [PATCH] add tests to fullScreen and Kiosk --- spec/api-browser-window-spec.js | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/spec/api-browser-window-spec.js b/spec/api-browser-window-spec.js index ab5d6d2d0d0b..bb41e9e442ee 100644 --- a/spec/api-browser-window-spec.js +++ b/spec/api-browser-window-spec.js @@ -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()