From 777704e6593e9fca4b34fc1d3d405eda5df07167 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 23 Mar 2016 16:53:20 -0700 Subject: [PATCH] Add failing spec for nodeIntegration inheritance --- spec/chromium-spec.js | 21 +++++++++++++++++++ .../window-opener-no-node-integration.html | 15 +++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 spec/fixtures/pages/window-opener-no-node-integration.html diff --git a/spec/chromium-spec.js b/spec/chromium-spec.js index 27660156e3..bb76cfb2a8 100644 --- a/spec/chromium-spec.js +++ b/spec/chromium-spec.js @@ -182,6 +182,27 @@ describe('chromium feature', function () { b = window.open('file://' + fixtures + '/pages/window-open-size.html', '', 'show=no') }) + it('disables node integration when it is disabled on the parent window', function (done) { + var b + listener = function (event) { + assert.equal(event.data, 'undefined') + b.close() + done() + } + window.addEventListener('message', listener) + + var windowUrl = require('url').format({ + pathname: fixtures + "/pages/window-opener-no-node-integration.html", + protocol: 'file', + query: { + p: fixtures + "/pages/window-opener-node.html" + }, + slashes: true + }) + console.log(windowUrl) + b = window.open(windowUrl, 'nodeIntegration=no,show=no') + }) + it('does not override child options', function (done) { var b, size size = { diff --git a/spec/fixtures/pages/window-opener-no-node-integration.html b/spec/fixtures/pages/window-opener-no-node-integration.html new file mode 100644 index 0000000000..e146a2804a --- /dev/null +++ b/spec/fixtures/pages/window-opener-no-node-integration.html @@ -0,0 +1,15 @@ + + + + +