Add "enable_desktop_capturer" build flag (#13133)
* Make it possible to disable a module for a renderer * Put DesktopCapturer API under a build flag The name is "enable_desktop_capturer". Enabled by default.
This commit is contained in:
parent
6ff111a141
commit
dee9aef975
11 changed files with 77 additions and 16 deletions
|
@ -1,10 +1,17 @@
|
|||
const assert = require('assert')
|
||||
const {desktopCapturer, remote, screen} = require('electron')
|
||||
const features = process.atomBinding('features')
|
||||
|
||||
const isCI = remote.getGlobal('isCi')
|
||||
|
||||
describe('desktopCapturer', () => {
|
||||
before(function () {
|
||||
if (!features.isDesktopCapturerEnabled()) {
|
||||
// It's been disabled during build time.
|
||||
this.skip()
|
||||
return
|
||||
}
|
||||
|
||||
if (isCI && process.platform === 'win32') {
|
||||
this.skip()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue