Merge pull request #6736 from electron/maximizable-state
Always restore maximizable state after changing window behavior/style
This commit is contained in:
commit
3be68ba136
2 changed files with 18 additions and 9 deletions
|
@ -738,6 +738,10 @@ describe('browser-window module', function () {
|
|||
w.destroy()
|
||||
w = new BrowserWindow({show: false, resizable: false})
|
||||
assert.equal(w.isResizable(), false)
|
||||
|
||||
if (process.platform === 'darwin') {
|
||||
assert.equal(w.isMaximizable(), true)
|
||||
}
|
||||
})
|
||||
|
||||
it('can be changed with setResizable method', function () {
|
||||
|
@ -846,6 +850,15 @@ describe('browser-window module', function () {
|
|||
assert.equal(w.isMaximizable(), false)
|
||||
w.setClosable(false)
|
||||
assert.equal(w.isMaximizable(), false)
|
||||
|
||||
w.setMaximizable(true)
|
||||
assert.equal(w.isMaximizable(), true)
|
||||
w.setClosable(true)
|
||||
assert.equal(w.isMaximizable(), true)
|
||||
w.setFullScreenable(false)
|
||||
assert.equal(w.isMaximizable(), true)
|
||||
w.setResizable(false)
|
||||
assert.equal(w.isMaximizable(), true)
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue