Wait for window to transition before leaving full screen
This commit is contained in:
parent
e1fe5f4fbf
commit
284ca3114b
1 changed files with 6 additions and 3 deletions
|
@ -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 () {
|
||||
|
|
Loading…
Reference in a new issue