test: move some BrowserWindow specs to the main process (#19182)
* test: move some BrowserWindow specs to the main process * uncomment cross-site test * move more tests * re-enable, refactor and move visibilitychange specs * move new-window event tests and re-enable them on mac * move max/minimize event tests * move modal tests * move beginFrameSubscription tests * move savePage test * move BrowserWindow options argument is optional test * move restore, unmaximize, fullscreen tests * move parent window tests * don't wait for show event on windows (#8664) * add debugging logs to fullscreen tests * more debugging on windows * explicitly destroy browserviews to prevent crash during gc * only await show on darwin * more event timing fixes * disable max/minimize event tests on linux, since they're broken on CI
This commit is contained in:
parent
7249b25868
commit
27599a851f
7 changed files with 1474 additions and 1677 deletions
|
@ -34,9 +34,6 @@ process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = true
|
|||
// eslint-disable-next-line
|
||||
process.stdout
|
||||
|
||||
// Adding a variable for sandbox process.env test validation
|
||||
process.env.sandboxmain = ''
|
||||
|
||||
// Access console to reproduce #3482.
|
||||
// eslint-disable-next-line
|
||||
console
|
||||
|
@ -231,18 +228,6 @@ ipcMain.on('prevent-next-new-window', (event, id) => {
|
|||
webContents.fromId(id).once('new-window', event => event.preventDefault())
|
||||
})
|
||||
|
||||
ipcMain.on('set-options-on-next-new-window', (event, id, key, value) => {
|
||||
webContents.fromId(id).once('new-window', (event, url, frameName, disposition, options) => {
|
||||
options[key] = value
|
||||
})
|
||||
})
|
||||
|
||||
ipcMain.on('set-web-preferences-on-next-new-window', (event, id, key, value) => {
|
||||
webContents.fromId(id).once('new-window', (event, url, frameName, disposition, options) => {
|
||||
options.webPreferences[key] = value
|
||||
})
|
||||
})
|
||||
|
||||
ipcMain.on('prevent-next-will-attach-webview', (event) => {
|
||||
event.sender.once('will-attach-webview', event => event.preventDefault())
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue