Exposing process.env status (#12166)

This commit is contained in:
Hari Juturu 2018-03-13 20:01:40 -07:00 committed by Samuel Attard
parent 134872e9c1
commit 704af29543
4 changed files with 24 additions and 0 deletions

View file

@ -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', () => {