From: Kevin Sawicki Date: Mon, 24 Apr 2017 17:25:12 +0000 (-0700) Subject: Add spec for chrome-devtools URL with no node integration X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f88eb2f867f4340320b378a18605bd060fc97f5;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Add spec for chrome-devtools URL with no node integration --- diff --git a/spec/chromium-spec.js b/spec/chromium-spec.js index 977f25e..9cce9fe 100644 --- a/spec/chromium-spec.js +++ b/spec/chromium-spec.js @@ -229,6 +229,20 @@ describe('chromium feature', function () { b = window.open(windowUrl, '', 'nodeIntegration=no,show=no') }) + it('disables node integration when it is disabled on the parent window for chrome devtools URLs', function (done) { + var b + app.once('web-contents-created', (event, contents) => { + contents.once('did-finish-load', () => { + contents.executeJavaScript('typeof process').then((typeofProcessGlobal) => { + assert.equal(typeofProcessGlobal, 'undefined') + b.close() + done() + }).catch(done) + }) + }) + b = window.open('chrome-devtools://devtools/bundled/inspector.html', '', 'nodeIntegration=no,show=no') + }) + it('disables JavaScript when it is disabled on the parent window', function (done) { var b app.once('web-contents-created', (event, contents) => {