Restart crash service in each spec
This commit is contained in:
parent
a7a92e1cd3
commit
de62f1ea6c
5 changed files with 55 additions and 5 deletions
6
spec/fixtures/api/crash-restart.html
vendored
6
spec/fixtures/api/crash-restart.html
vendored
|
@ -3,7 +3,7 @@
|
|||
<script type="text/javascript" charset="utf-8">
|
||||
|
||||
const {port} = require('url').parse(window.location.href, true).query
|
||||
const {crashReporter} = require('electron')
|
||||
const {crashReporter, ipcRenderer} = require('electron')
|
||||
|
||||
crashReporter.start({
|
||||
productName: 'Zombies',
|
||||
|
@ -18,6 +18,10 @@ crashReporter.start({
|
|||
}
|
||||
})
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
ipcRenderer.sendSync('crash-service-pid', crashReporter._crashServiceProcess.pid)
|
||||
}
|
||||
|
||||
setImmediate(() => {
|
||||
if (process.platform === 'darwin') {
|
||||
crashReporter.setExtraParameter('extra2', 'extra2')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue