From e767d3c131024924cd9fc159b6e496f74aa5655a Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 8 Aug 2016 09:42:43 -0700 Subject: [PATCH] Add spec for executeJavaScript DOM class prototype --- spec/api-browser-window-spec.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/api-browser-window-spec.js b/spec/api-browser-window-spec.js index 5d5481a5e..362105c7b 100644 --- a/spec/api-browser-window-spec.js +++ b/spec/api-browser-window-spec.js @@ -1206,6 +1206,15 @@ describe('browser-window module', function () { }) w.loadURL(server.url) }) + + it('works with result objects that have DOM class prototypes', function (done) { + w.webContents.executeJavaScript('document.location', function (result) { + assert.equal(result.origin, server.url) + assert.equal(result.protocol, 'http:') + done() + }) + w.loadURL(server.url) + }) }) describe('offscreen rendering', function () {