spec: Bring back beginFrameSubscription test
authorCheng Zhao <zcbenz@gmail.com>
Tue, 16 Feb 2016 02:30:18 +0000 (10:30 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 16 Feb 2016 02:30:18 +0000 (10:30 +0800)
spec/api-browser-window-spec.js

index 1c92d408c4c9f5522250424a3a0b8775bca1b401..89e9b770ab20de7a9ae2684ec81ae2843fc69e48 100644 (file)
@@ -478,10 +478,16 @@ describe('browser-window module', function() {
     });
   });
 
-  xdescribe('beginFrameSubscription method', function() {
+  describe('beginFrameSubscription method', function() {
     it('subscribes frame updates', function(done) {
+      let called = false;
       w.loadURL("file://" + fixtures + "/api/blank.html");
       w.webContents.beginFrameSubscription(function(data) {
+        // This callback might be called twice.
+        if (called)
+          return;
+        called = true;
+
         assert.notEqual(data.length, 0);
         w.webContents.endFrameSubscription();
         done();