feat: promisify netLog.stopLogging (#16862)
This commit is contained in:
parent
3b74837020
commit
7e7abc28f5
9 changed files with 78 additions and 35 deletions
10
spec/fixtures/api/net-log/main.js
vendored
10
spec/fixtures/api/net-log/main.js
vendored
|
@ -14,14 +14,6 @@ function request () {
|
|||
})
|
||||
}
|
||||
|
||||
function stopLogging (netLog) {
|
||||
return new Promise((resolve) => {
|
||||
netLog.stopLogging((path) => {
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
app.on('ready', async () => {
|
||||
const netLog = session.defaultSession.netLog
|
||||
|
||||
|
@ -38,7 +30,7 @@ app.on('ready', async () => {
|
|||
await request()
|
||||
|
||||
if (process.env.TEST_MANUAL_STOP) {
|
||||
await stopLogging(netLog)
|
||||
await netLog.stopLogging()
|
||||
}
|
||||
|
||||
app.quit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue