Add spec for BrowserWindow.capturePage.
This commit is contained in:
parent
33ad68f7a7
commit
80824b13c6
1 changed files with 7 additions and 0 deletions
|
@ -75,6 +75,13 @@ describe 'window module', ->
|
|||
assert.equal w.isVisible(), false
|
||||
w.close()
|
||||
|
||||
describe 'BrowserWindow.capturePage(rect, callback)', ->
|
||||
it 'calls the callback with a Buffer', ->
|
||||
w = new BrowserWindow(show: false)
|
||||
w.capturePage {x: 0, y: 0, width: 100, height: 100}, (image) ->
|
||||
assert.equal image.constructor.name, 'SlowBuffer'
|
||||
w.close()
|
||||
|
||||
describe 'beforeunload handler', ->
|
||||
it 'returning true would not prevent close', (done) ->
|
||||
w = new BrowserWindow(show: false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue