Browse Source

Add failing webContents.isFocused spec

Kevin Sawicki 8 years ago
parent
commit
cc7fe82b74
1 changed files with 8 additions and 0 deletions
  1. 8 0
      spec/api-web-contents-spec.js

+ 8 - 0
spec/api-web-contents-spec.js

@@ -71,4 +71,12 @@ describe('webContents module', function () {
       specWebContents.openDevTools()
     })
   })
+
+  describe('isFocused() API', function () {
+    it('returns false when the window is hidden', function () {
+      BrowserWindow.getAllWindows().forEach(function (window) {
+        assert.equal(!window.isVisible() && window.webContents.isFocused(), false)
+      })
+    })
+  })
 })