test: move more web contents specs (#20099)

This commit is contained in:
Jeremy Apthorp 2019-09-30 15:00:47 -07:00 committed by GitHub
parent b7b0992768
commit a9e695d05f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 504 additions and 572 deletions

View file

@ -152,19 +152,6 @@ app.on('ready', function () {
console.error('Renderer process crashed')
process.exit(1)
})
ipcMain.on('prevent-next-input-event', (event, key, id) => {
webContents.fromId(id).once('before-input-event', (event, input) => {
if (key === input.key) event.preventDefault()
})
event.returnValue = null
})
})
ipcMain.on('handle-next-ipc-message-sync', function (event, returnValue) {
event.sender.once('ipc-message-sync', (event, channel, args) => {
event.returnValue = returnValue
})
})
for (const eventName of [