diff --git a/spec/chromium-spec.js b/spec/chromium-spec.js index 8274caf0213f..6567477b0728 100644 --- a/spec/chromium-spec.js +++ b/spec/chromium-spec.js @@ -309,6 +309,26 @@ describe('chromium feature', function () { b = window.open(windowUrl, '', 'javascript=no,show=no') }) + it('disables the tag when it is disabled on the parent window', function (done) { + let b + listener = function (event) { + assert.equal(event.data.isWebViewGlobalUndefined, true) + b.close() + done() + } + window.addEventListener('message', listener) + + var windowUrl = require('url').format({ + pathname: `${fixtures}/pages/window-opener-no-webview-tag.html`, + protocol: 'file', + query: { + p: `${fixtures}/pages/window-opener-webview.html` + }, + slashes: true + }) + b = window.open(windowUrl, '', 'webviewTag=no,nodeIntegration=yes,show=no') + }) + it('does not override child options', function (done) { var b, size size = { diff --git a/spec/fixtures/pages/window-opener-no-webview-tag.html b/spec/fixtures/pages/window-opener-no-webview-tag.html new file mode 100644 index 000000000000..9b53b36875c0 --- /dev/null +++ b/spec/fixtures/pages/window-opener-no-webview-tag.html @@ -0,0 +1,15 @@ + + + + + diff --git a/spec/fixtures/pages/window-opener-webview.html b/spec/fixtures/pages/window-opener-webview.html new file mode 100644 index 000000000000..36809c03ef2f --- /dev/null +++ b/spec/fixtures/pages/window-opener-webview.html @@ -0,0 +1,11 @@ + + + + +