From be600fda553f7c3b6af75aba3428f56e5970a282 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 21 Sep 2015 11:24:05 +0800 Subject: [PATCH] spec: Prevent callback of beginFrameSubscription being called twice --- spec/api-browser-window-spec.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/api-browser-window-spec.coffee b/spec/api-browser-window-spec.coffee index bb4d782e7ffb..64e62716604d 100644 --- a/spec/api-browser-window-spec.coffee +++ b/spec/api-browser-window-spec.coffee @@ -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()