test: move the last of the browser window specs (#19295)
* move devtools extensions tests * move executeJavaScript tests * move previewFile test * move contextIsolation tests * move OSR tests * RIP api-browser-window-spec.js .--. .-, .-..-.__ .'(`.-` \_.-'-./` |\_( "\__ __.>\ '; _;---,._| / __/`'--) /.--. : |/' _.--.<| / | | _..-' `\ /' /` /_/ _/_/ >_.-``-. `Y /' _;---.`|/)))) '` .-''. \|: .' __, .-'"` .'--._ `-: \/: /' '.\ _|_ /.'`\ :; /' `- `-|-` -` | | | :.; : | .-'~^~`-. |: | .' _ _ `. |:. | | |_) | |_) | :. : | | | \ | | | : ; | | | : ; | | Here lies | : ; | | 1000 | : ; | | flaky | : ; | | tests | .jgs. : ; | | -."-/\\\/:::. `\."-._'."-"_\\-| |///."- " -."-.\\"-."//.-".`-."_\\-.".-\\`=.........=`//-". * remove unused ipcMain listeners * remove debugging logs * close windows in offscreen test * more closeAllWindows * remove extra logs * refactor webContents main spec using closeAllWindows
This commit is contained in:
parent
16011cacef
commit
2a5d40617a
4 changed files with 600 additions and 755 deletions
|
@ -159,18 +159,6 @@ app.on('ready', function () {
|
|||
})
|
||||
event.returnValue = null
|
||||
})
|
||||
|
||||
ipcMain.on('executeJavaScript', function (event, code) {
|
||||
window.webContents.executeJavaScript(code).then((result) => {
|
||||
window.webContents.send('executeJavaScript-promise-response', result)
|
||||
}).catch((error) => {
|
||||
window.webContents.send('executeJavaScript-promise-error', error)
|
||||
|
||||
if (error && error.name) {
|
||||
window.webContents.send('executeJavaScript-promise-error-name', error.name)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
ipcMain.on('handle-next-ipc-message-sync', function (event, returnValue) {
|
||||
|
@ -224,18 +212,10 @@ ipcMain.on('create-window-with-options-cycle', (event) => {
|
|||
event.returnValue = window.id
|
||||
})
|
||||
|
||||
ipcMain.on('prevent-next-new-window', (event, id) => {
|
||||
webContents.fromId(id).once('new-window', event => event.preventDefault())
|
||||
})
|
||||
|
||||
ipcMain.on('prevent-next-will-attach-webview', (event) => {
|
||||
event.sender.once('will-attach-webview', event => event.preventDefault())
|
||||
})
|
||||
|
||||
ipcMain.on('prevent-next-will-prevent-unload', (event, id) => {
|
||||
webContents.fromId(id).once('will-prevent-unload', event => event.preventDefault())
|
||||
})
|
||||
|
||||
ipcMain.on('disable-node-on-next-will-attach-webview', (event, id) => {
|
||||
event.sender.once('will-attach-webview', (event, webPreferences, params) => {
|
||||
params.src = `file://${path.join(__dirname, '..', 'fixtures', 'pages', 'c.html')}`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue