Skip to content

Commit 181b8d7

Browse files
committed
Add spec for min/max window size
1 parent 15f7dc6 commit 181b8d7

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

spec/api-browser-window-spec.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,21 @@ describe('browser-window module', function () {
287287
})
288288
})
289289

290+
describe('BrowserWindow.setMinimum/MaximumSize(width, height)', function () {
291+
it('sets the maximum and minimum size of the window', function () {
292+
assert.deepEqual(w.getMinimumSize(), [0, 0])
293+
assert.deepEqual(w.getMaximumSize(), [0, 0])
294+
295+
w.setMinimumSize(100, 100)
296+
assert.deepEqual(w.getMinimumSize(), [100, 100])
297+
assert.deepEqual(w.getMaximumSize(), [0, 0])
298+
299+
w.setMaximumSize(900, 600)
300+
assert.deepEqual(w.getMinimumSize(), [100, 100])
301+
assert.deepEqual(w.getMaximumSize(), [900, 600])
302+
})
303+
})
304+
290305
describe('BrowserWindow.setAspectRatio(ratio)', function () {
291306
it('resets the behaviour when passing in 0', function (done) {
292307
var size = [300, 400]

0 commit comments

Comments
 (0)