spec: Prevent callback of beginFrameSubscription being called twice
This commit is contained in:
parent
35fc8885de
commit
be600fda55
1 changed files with 3 additions and 0 deletions
|
@ -306,8 +306,11 @@ describe 'browser-window module', ->
|
|||
|
||||
describe 'beginFrameSubscription method', ->
|
||||
it 'subscribes frame updates', (done) ->
|
||||
called = false
|
||||
w.loadUrl "file://#{fixtures}/api/blank.html"
|
||||
w.webContents.beginFrameSubscription (data) ->
|
||||
return if called
|
||||
called = true
|
||||
assert.notEqual data.length, 0
|
||||
w.webContents.endFrameSubscription()
|
||||
done()
|
||||
|
|
Loading…
Reference in a new issue