mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
test: move some remote specs to the main runner (#18636)
This commit is contained in:
committed by
Shelley Vohr
parent
a9f601612f
commit
bb19142389
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user