From cc7fe82b7414018ec31095c15cf48042153a290c Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 15 Aug 2016 14:03:31 -0700 Subject: [PATCH] Add failing webContents.isFocused spec --- spec/api-web-contents-spec.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/api-web-contents-spec.js b/spec/api-web-contents-spec.js index 66b20ca2a..e8bf146d4 100644 --- a/spec/api-web-contents-spec.js +++ b/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) + }) + }) + }) })