diff --git a/spec/api-browser-window-spec.coffee b/spec/api-browser-window-spec.coffee index ce1282439a2d..c63254261779 100644 --- a/spec/api-browser-window-spec.coffee +++ b/spec/api-browser-window-spec.coffee @@ -117,6 +117,15 @@ describe 'browser-window module', -> assert.equal after[0], size[0] assert.equal after[1], size[1] + it 'works for framless window', -> + w.destroy() + w = new BrowserWindow(show: false, frame: false, width: 400, height: 400) + size = [400, 400] + w.setContentSize size[0], size[1] + after = w.getContentSize() + assert.equal after[0], size[0] + assert.equal after[1], size[1] + describe 'BrowserWindow.fromId(id)', -> it 'returns the window with id', -> assert.equal w.id, BrowserWindow.fromId(w.id).id @@ -134,6 +143,16 @@ describe 'browser-window module', -> assert.equal size[0], 400 assert.equal size[1], 400 + it 'works for framless window', -> + w.destroy() + w = new BrowserWindow(show: false, frame: false, width: 400, height: 400, 'use-content-size': true) + contentSize = w.getContentSize() + assert.equal contentSize[0], 400 + assert.equal contentSize[1], 400 + size = w.getSize() + assert.equal size[0], 400 + assert.equal size[1], 400 + describe '"enable-larger-than-screen" option', -> return if process.platform is 'linux'