From 3f4af3a2ba7f459f0a2f7d22a7cc8cb9381e7825 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 26 Aug 2016 09:29:27 -0700 Subject: [PATCH] Convert specs to expect empty objects --- spec/api-browser-window-spec.js | 5 ++--- spec/api-ipc-spec.js | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/spec/api-browser-window-spec.js b/spec/api-browser-window-spec.js index ba8c979a9f..d6ac2846da 100644 --- a/spec/api-browser-window-spec.js +++ b/spec/api-browser-window-spec.js @@ -1255,10 +1255,9 @@ describe('browser-window module', function () { w.loadURL(server.url) }) - it('works with result objects that have DOM class prototypes', function (done) { + it('converts DOM objects to empty objects', function (done) { w.webContents.executeJavaScript('document.location', function (result) { - assert.equal(result.origin, server.url) - assert.equal(result.protocol, 'http:') + assert.deepEqual(result, {}) done() }) w.loadURL(server.url) diff --git a/spec/api-ipc-spec.js b/spec/api-ipc-spec.js index 1af3ce6634..9231fb042d 100644 --- a/spec/api-ipc-spec.js +++ b/spec/api-ipc-spec.js @@ -317,10 +317,9 @@ describe('ipc module', function () { ipcRenderer.send('message', buffer) }) - it('can send objects with DOM class prototypes', function (done) { + it('converts DOM objects to empty objects', function (done) { ipcRenderer.once('message', function (event, value) { - assert.equal(value.protocol, 'file:') - assert.equal(value.hostname, '') + assert.deepEqual(value, {}) done() }) ipcRenderer.send('message', document.location)