Browse Source

Merge pull request #8370 from electron/resizable-specs

Add spec for resizable frameless window
Kevin Sawicki 8 years ago
parent
commit
8ada7fe30b
1 changed files with 12 additions and 0 deletions
  1. 12 0
      spec/api-browser-window-spec.js

+ 12 - 0
spec/api-browser-window-spec.js

@@ -1258,6 +1258,18 @@ describe('BrowserWindow module', function () {
         w.setResizable(true)
         assert.equal(w.isResizable(), true)
       })
+
+      it('works for a frameless window', () => {
+        w.destroy()
+        w = new BrowserWindow({show: false, frame: false})
+        assert.equal(w.isResizable(), true)
+
+        if (process.platform === 'win32') {
+          w.destroy()
+          w = new BrowserWindow({show: false, thickFrame: false})
+          assert.equal(w.isResizable(), false)
+        }
+      })
     })
 
     describe('loading main frame state', function () {