Add spec for sending document.location over IPC
authorKevin Sawicki <kevinsawicki@gmail.com>
Mon, 8 Aug 2016 16:35:30 +0000 (09:35 -0700)
committerKevin Sawicki <kevinsawicki@gmail.com>
Mon, 8 Aug 2016 16:35:30 +0000 (09:35 -0700)
spec/api-ipc-spec.js

index 8a57fb0..8d08baf 100644 (file)
@@ -294,6 +294,15 @@ describe('ipc module', function () {
       })
       ipcRenderer.send('message', currentDate)
     })
+
+    it('can send objects with DOM class prototypes', function (done) {
+      ipcRenderer.once('message', function (event, value) {
+        assert.equal(value.protocol, 'file:')
+        assert.equal(value.hostname, '')
+        done()
+      })
+      ipcRenderer.send('message', document.location)
+    })
   })
 
   describe('ipc.sendSync', function () {