Set preload script on opened windows

This commit is contained in:
Kevin Sawicki 2017-07-10 17:12:40 -07:00
parent fdb1fddc26
commit 208be2a542

View file

@ -1005,6 +1005,7 @@ describe('BrowserWindow module', function () {
preload: preload preload: preload
} }
}) })
ipcRenderer.send('set-web-preferences-on-next-new-window', w.webContents.id, 'preload', preload)
let htmlPath = path.join(fixtures, 'api', 'sandbox.html?window-open') let htmlPath = path.join(fixtures, 'api', 'sandbox.html?window-open')
const pageUrl = 'file://' + htmlPath const pageUrl = 'file://' + htmlPath
w.loadURL(pageUrl) w.loadURL(pageUrl)
@ -1035,6 +1036,7 @@ describe('BrowserWindow module', function () {
preload: preload preload: preload
} }
}) })
ipcRenderer.send('set-web-preferences-on-next-new-window', w.webContents.id, 'preload', preload)
let htmlPath = path.join(fixtures, 'api', 'sandbox.html?window-open-external') let htmlPath = path.join(fixtures, 'api', 'sandbox.html?window-open-external')
const pageUrl = 'file://' + htmlPath const pageUrl = 'file://' + htmlPath
let popupWindow let popupWindow