Exposing process.env status (#12166)
This commit is contained in:
parent
134872e9c1
commit
704af29543
4 changed files with 24 additions and 0 deletions
|
@ -1539,6 +1539,23 @@ describe('BrowserWindow module', () => {
|
|||
done()
|
||||
})
|
||||
})
|
||||
|
||||
it('validate process.env access in sandbox renderer', (done) => {
|
||||
ipcMain.once('answer', function (event, test) {
|
||||
assert.equal(test, 'foo')
|
||||
done()
|
||||
})
|
||||
remote.process.env.sandboxmain = 'foo'
|
||||
w.destroy()
|
||||
w = new BrowserWindow({
|
||||
show: false,
|
||||
webPreferences: {
|
||||
sandbox: true,
|
||||
preload: preload
|
||||
}
|
||||
})
|
||||
w.loadURL('file://' + path.join(fixtures, 'api', 'preload.html'))
|
||||
})
|
||||
})
|
||||
|
||||
describe('nativeWindowOpen option', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue