chore: bump chromium to e049d599a8332b9b2785b0178be74 (master) (#20314)

This commit is contained in:
Electron Bot 2019-10-18 15:57:34 -04:00 committed by Jeremy Apthorp
parent 0090616f7b
commit 3ac3fbdbfb
94 changed files with 670 additions and 1213 deletions

View file

@ -40,3 +40,16 @@ export const emittedNTimes = async (emitter: NodeJS.EventEmitter, eventName: str
}
return p
}
export const emittedUntil = async (emitter: NodeJS.EventEmitter, eventName: string, untilFn: Function) => {
const p = new Promise<any[][]>(resolve => {
const handler = (...args: any[]) => {
if (untilFn(...args)) {
emitter.removeListener(eventName, handler)
resolve(args)
}
}
emitter.on(eventName, handler)
})
return p
}