From c754b5efdc300b448c4b1f2c71925da4c65a4b1b Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 15 Aug 2016 12:30:26 -0700 Subject: [PATCH] Add failing spec for state changes resizing frameless window --- spec/api-browser-window-spec.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/spec/api-browser-window-spec.js b/spec/api-browser-window-spec.js index 39299eeae1bc..ba8c979a9f8b 100644 --- a/spec/api-browser-window-spec.js +++ b/spec/api-browser-window-spec.js @@ -751,6 +751,36 @@ describe('browser-window module', function () { }) describe('window states', function () { + it('does not resize frameless windows when states change', function () { + w.destroy() + w = new BrowserWindow({ + frame: false, + width: 300, + height: 200, + show: false + }) + + w.setMinimizable(false) + w.setMinimizable(true) + assert.deepEqual(w.getSize(), [300, 200]) + + w.setResizable(false) + w.setResizable(true) + assert.deepEqual(w.getSize(), [300, 200]) + + w.setMaximizable(false) + w.setMaximizable(true) + assert.deepEqual(w.getSize(), [300, 200]) + + w.setFullScreenable(false) + w.setFullScreenable(true) + assert.deepEqual(w.getSize(), [300, 200]) + + w.setClosable(false) + w.setClosable(true) + assert.deepEqual(w.getSize(), [300, 200]) + }) + describe('resizable state', function () { it('can be changed with resizable option', function () { w.destroy()