mirror of
https://github.com/electron/electron.git
synced 2026-02-17 10:31:38 -05:00
spec: Prevent callback of beginFrameSubscription being called twice
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user