fix: crash when exiting simple fullscreen on macOS (#20144)

This commit is contained in:
Shelley Vohr 2019-09-12 13:38:16 -04:00 committed by GitHub
parent 5dee8a5717
commit 3ec17a88ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 3 deletions

View file

@ -3389,6 +3389,16 @@ describe('BrowserWindow module', () => {
w.setFullScreen(true)
})
it('does not crash when exiting simpleFullScreen', (done) => {
const w = new BrowserWindow()
w.setSimpleFullScreen(true)
setTimeout(() => {
w.setFullScreen(!w.isFullScreen())
done()
}, 1000)
})
it('should not be changed by setKiosk method', (done) => {
const w = new BrowserWindow()
w.once('enter-full-screen', async () => {