diff --git a/spec/static/main.js b/spec/static/main.js index 0e89fad20df7..0763ba2ecf91 100644 --- a/spec/static/main.js +++ b/spec/static/main.js @@ -255,7 +255,8 @@ ipcMain.on('prevent-next-will-attach-webview', (event) => { }) ipcMain.on('disable-node-on-next-will-attach-webview', (event, id) => { - event.sender.once('will-attach-webview', (event, guest, webPreferences) => { + event.sender.once('will-attach-webview', (event, guest, webPreferences, params) => { + params.src = `file://${path.join(__dirname, '..', 'fixtures', 'pages', 'c.html')}` webPreferences.nodeIntegration = false }) }) diff --git a/spec/webview-spec.js b/spec/webview-spec.js index fb360db781f4..02207a4b26a4 100644 --- a/spec/webview-spec.js +++ b/spec/webview-spec.js @@ -1108,7 +1108,7 @@ describe(' tag', function () { done() }) webview.setAttribute('nodeintegration', 'yes') - webview.src = 'file://' + fixtures + '/pages/c.html' + webview.src = 'file://' + fixtures + '/pages/a.html' document.body.appendChild(webview) }) @@ -1122,9 +1122,6 @@ describe(' tag', function () { }) }) - it('emits a new-webview event when first attached that ', () => { - }) - it('loads devtools extensions registered on the parent window', function (done) { w = new BrowserWindow({ show: false