Wait for window to transition before leaving full screen

This commit is contained in:
Kevin Sawicki 2017-01-24 08:29:50 -08:00
parent e1fe5f4fbf
commit 284ca3114b

View file

@ -1437,13 +1437,16 @@ describe('BrowserWindow module', function () {
// Only implemented on macOS.
if (process.platform !== 'darwin') return
it('can be changed with setFullScreen method', function () {
it('can be changed with setFullScreen method', function (done) {
w.destroy()
w = new BrowserWindow()
w.once('enter-full-screen', () => {
w.setFullScreen(false)
assert.equal(w.isFullScreen(), false)
done()
})
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 () {