(methodOrPredicate)
| 233 | } |
| 234 | |
| 235 | async _asyncWaitForNotification(methodOrPredicate) { |
| 236 | function matchMethod(notification) { |
| 237 | return notification.method === methodOrPredicate; |
| 238 | } |
| 239 | const predicate = |
| 240 | typeof methodOrPredicate === 'string' ? matchMethod : methodOrPredicate; |
| 241 | let notification = null; |
| 242 | do { |
| 243 | if (this._unprocessedNotifications.length) { |
| 244 | notification = this._unprocessedNotifications.shift(); |
| 245 | } else { |
| 246 | notification = await new Promise( |
| 247 | (resolve) => this._notificationCallback = resolve); |
| 248 | } |
| 249 | } while (!predicate(notification)); |
| 250 | return notification; |
| 251 | } |
| 252 | |
| 253 | _isBreakOnLineNotification(message, line, expectedScriptPath) { |
| 254 | if (message.method === 'Debugger.paused') { |
no test coverage detected