diff --git a/spec/api-ipc-spec.js b/spec/api-ipc-spec.js index 20b1dad13a..dda32c0a83 100644 --- a/spec/api-ipc-spec.js +++ b/spec/api-ipc-spec.js @@ -327,6 +327,15 @@ describe('ipc module', function () { ipcRenderer.send('message', document.location) }) + it('can send Electron API objects', function (done) { + const webContents = remote.getCurrentWebContents() + ipcRenderer.once('message', function (event, value) { + assert.deepEqual(value.browserWindowOptions, webContents.browserWindowOptions) + done() + }) + ipcRenderer.send('message', webContents) + }) + it('does not crash on HTTP request objects (regression)', function (done) { const request = http.request({port: 5000, hostname: '127.0.0.1', method: 'GET', path: '/'}) request.on('error', function () {})