fix: create a window capturer correctly (backport: 3-0-x) (#13693)

* fix: create a window capturer correctly

We were incorrectly creating two screen capturers instead of a window
capturer

* spec: ensure dc tests pass

* spec: enable all tests after verifying dc tests work
This commit is contained in:
trop[bot] 2018-07-17 15:30:33 +10:00 committed by Samuel Attard
parent b49b071a1f
commit fcdbb8c4a7
2 changed files with 5 additions and 1 deletions

View file

@ -69,7 +69,11 @@ describe('desktopCapturer', () => {
return done()
}
const { BrowserWindow } = remote
const w = new BrowserWindow({ width: 200, height: 200 })
desktopCapturer.getSources({types: ['window']}, (error, sources) => {
w.destroy()
expect(error).to.be.null()
expect(sources).to.be.an('array').that.is.not.empty()
for (const {display_id: displayId} of sources) {