fix: quit after Chromium is fully started (#21488)
* fix: quit when chromium is fully started * test: remove hacks on app.quit * chore: RunUntilIdle is unnecessary
This commit is contained in:
parent
b9a250a623
commit
f9a1dc10fe
8 changed files with 24 additions and 17 deletions
4
spec/fixtures/api/command-line/main.js
vendored
4
spec/fixtures/api/command-line/main.js
vendored
|
@ -9,7 +9,5 @@ app.on('ready', () => {
|
|||
process.stdout.write(JSON.stringify(payload))
|
||||
process.stdout.end()
|
||||
|
||||
setImmediate(() => {
|
||||
app.quit()
|
||||
})
|
||||
app.quit()
|
||||
})
|
||||
|
|
4
spec/fixtures/api/cookie-app/main.js
vendored
4
spec/fixtures/api/cookie-app/main.js
vendored
|
@ -42,8 +42,6 @@ app.on('ready', async function () {
|
|||
} finally {
|
||||
process.stdout.end()
|
||||
|
||||
setImmediate(() => {
|
||||
app.quit()
|
||||
})
|
||||
app.quit()
|
||||
}
|
||||
})
|
||||
|
|
4
spec/fixtures/api/ipc-main-listeners/main.js
vendored
4
spec/fixtures/api/ipc-main-listeners/main.js
vendored
|
@ -4,7 +4,5 @@ app.on('ready', () => {
|
|||
process.stdout.write(JSON.stringify(ipcMain.eventNames()))
|
||||
process.stdout.end()
|
||||
|
||||
setImmediate(() => {
|
||||
app.quit()
|
||||
})
|
||||
app.quit()
|
||||
})
|
||||
|
|
2
spec/fixtures/api/leak-exit-browserview.js
vendored
2
spec/fixtures/api/leak-exit-browserview.js
vendored
|
@ -2,5 +2,5 @@ const { BrowserView, app } = require('electron')
|
|||
app.on('ready', function () {
|
||||
new BrowserView({}) // eslint-disable-line
|
||||
|
||||
process.nextTick(() => app.quit())
|
||||
app.quit()
|
||||
})
|
||||
|
|
2
spec/fixtures/api/leak-exit-webcontents.js
vendored
2
spec/fixtures/api/leak-exit-webcontents.js
vendored
|
@ -2,5 +2,5 @@ const { app, webContents } = require('electron')
|
|||
app.on('ready', function () {
|
||||
webContents.create({})
|
||||
|
||||
process.nextTick(() => app.quit())
|
||||
app.quit()
|
||||
})
|
||||
|
|
4
spec/fixtures/api/locale-check/main.js
vendored
4
spec/fixtures/api/locale-check/main.js
vendored
|
@ -4,7 +4,5 @@ app.on('ready', () => {
|
|||
process.stdout.write(app.getLocale())
|
||||
process.stdout.end()
|
||||
|
||||
setImmediate(() => {
|
||||
app.quit()
|
||||
})
|
||||
app.quit()
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue