spec: Test setContentSize for frameless window
This commit is contained in:
parent
f6263f8c6b
commit
f25cf7481f
1 changed files with 19 additions and 0 deletions
|
@ -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'
|
||||
|
||||
|
|
Loading…
Reference in a new issue