test: move some remote specs to the main runner (#18636)

This commit is contained in:
Jeremy Apthorp 2019-06-07 10:43:32 -07:00 committed by Shelley Vohr
parent a9f601612f
commit bb19142389
4 changed files with 118 additions and 84 deletions

View file

@ -184,26 +184,8 @@ ipcMain.on('handle-next-ipc-message-sync', function (event, returnValue) {
})
})
for (const eventName of [
'remote-require',
'remote-get-global',
'remote-get-builtin'
]) {
ipcMain.on(`handle-next-${eventName}`, function (event, valuesMap = {}) {
event.sender.once(eventName, (event, name) => {
if (valuesMap.hasOwnProperty(name)) {
event.returnValue = valuesMap[name]
} else {
event.preventDefault()
}
})
})
}
for (const eventName of [
'desktop-capturer-get-sources',
'remote-get-current-window',
'remote-get-current-web-contents',
'remote-get-guest-web-contents'
]) {
ipcMain.on(`handle-next-${eventName}`, function (event, returnValue) {