Merge pull request #8047 from electron/fix-incorrect-window-size

Fix incorrect window size after restore on Windows
This commit is contained in:
Kevin Sawicki 2016-11-22 14:01:50 -08:00 committed by GitHub
commit e356168c9a
4 changed files with 90 additions and 13 deletions

View file

@ -1320,6 +1320,34 @@ describe('browser-window module', function () {
})
})
describe('BrowserWindow.restore()', function () {
it('should restore the previous window size', function () {
if (w != null) w.destroy()
w = new BrowserWindow({
minWidth: 800,
width: 800
})
const initialSize = w.getSize()
w.minimize()
w.restore()
assertBoundsEqual(w.getSize(), initialSize)
})
})
describe('BrowserWindow.unmaximize()', function () {
it('should restore the previous window position', function () {
if (w != null) w.destroy()
w = new BrowserWindow()
const initialPosition = w.getPosition()
w.maximize()
w.unmaximize()
assertBoundsEqual(w.getPosition(), initialPosition)
})
})
describe('parent window', function () {
let c = null