Test external value as send argument

This commit is contained in:
Kevin Sawicki 2016-08-30 09:27:12 -07:00
Родитель 8a9776b227
Коммит 3e7a0e4b43
1 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -338,13 +338,16 @@ describe('ipc module', function () {
it('does not crash on external objects (regression)', function (done) {
const request = http.request({port: 5000, hostname: '127.0.0.1', method: 'GET', path: '/'})
const stream = request.agent.sockets['127.0.0.1:5000:'][0]._handle._externalStream
request.on('error', function () {})
ipcRenderer.once('message', function (event, value) {
assert.equal(value.method, 'GET')
assert.equal(value.path, '/')
ipcRenderer.once('message', function (event, requestValue, externalStreamValue) {
assert.equal(requestValue.method, 'GET')
assert.equal(requestValue.path, '/')
assert.equal(externalStreamValue, null)
done()
})
ipcRenderer.send('message', request)
ipcRenderer.send('message', request, stream)
})
it('can send objects that both reference the same object', function (done) {