feat: enable mixed-sandbox mode by default (#15894)

This commit is contained in:
Jeremy Apthorp 2019-01-22 10:44:28 -08:00 committed by GitHub
parent 1918e76913
commit 92b9525cfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 15 additions and 91 deletions

View file

@ -1111,56 +1111,6 @@ describe('app module', () => {
})
})
})
describe('when app.enableMixedSandbox() is called', () => {
it('adds --enable-sandbox to renderer processes created with sandbox: true', done => {
const appPath = path.join(__dirname, 'fixtures', 'api', 'mixed-sandbox-app')
appProcess = ChildProcess.spawn(remote.process.execPath, [appPath, '--app-enable-mixed-sandbox'])
server.once('error', error => { done(error) })
server.on('connection', client => {
client.once('data', data => {
const argv = JSON.parse(data)
expect(argv.sandbox).to.include('--enable-sandbox')
expect(argv.sandbox).to.not.include('--no-sandbox')
expect(argv.noSandbox).to.not.include('--enable-sandbox')
expect(argv.noSandbox).to.include('--no-sandbox')
expect(argv.noSandboxDevtools).to.be.true()
expect(argv.sandboxDevtools).to.be.true()
done()
})
})
})
})
describe('when the app is launched with --enable-mixed-sandbox', () => {
it('adds --enable-sandbox to renderer processes created with sandbox: true', done => {
const appPath = path.join(__dirname, 'fixtures', 'api', 'mixed-sandbox-app')
appProcess = ChildProcess.spawn(remote.process.execPath, [appPath, '--enable-mixed-sandbox'])
server.once('error', error => { done(error) })
server.on('connection', client => {
client.once('data', data => {
const argv = JSON.parse(data)
expect(argv.sandbox).to.include('--enable-sandbox')
expect(argv.sandbox).to.not.include('--no-sandbox')
expect(argv.noSandbox).to.not.include('--enable-sandbox')
expect(argv.noSandbox).to.include('--no-sandbox')
expect(argv.noSandboxDevtools).to.be.true()
expect(argv.sandboxDevtools).to.be.true()
done()
})
})
})
})
})
describe('disableDomainBlockingFor3DAPIs() API', () => {