Merge pull request #9695 from shubham2892/alwaysOnTop-window-disappears-when-restored-fix

Fix an issue where alwaysOnTop window disappears when restore…
This commit is contained in:
Kevin Sawicki 2017-07-14 10:09:13 -07:00 committed by GitHub
commit 0a71a9b992
2 changed files with 26 additions and 0 deletions

View file

@ -615,6 +615,22 @@ describe('BrowserWindow module', function () {
})
})
describe('BrowserWindow.alwaysOnTop() resets level on minimize', function () {
if (process.platform !== 'darwin') {
return
}
it('resets the windows level on minimize', function () {
assert.equal(w.isAlwaysOnTop(), false)
w.setAlwaysOnTop(true, 'screen-saver')
assert.equal(w.isAlwaysOnTop(), true)
w.minimize()
assert.equal(w.isAlwaysOnTop(), false)
w.restore()
assert.equal(w.isAlwaysOnTop(), true)
})
})
describe('BrowserWindow.setAutoHideCursor(autoHide)', () => {
if (process.platform !== 'darwin') {
it('is not available on non-macOS platforms', () => {