(message)
| 190 | } |
| 191 | |
| 192 | postMessage(message) { |
| 193 | validateMessageFormat(message); |
| 194 | |
| 195 | // if we get a error message on the queue make sure we register that |
| 196 | if (message.type === 'error' || message.type.endsWith('.error')) { |
| 197 | this.errors.push('' + message.data); |
| 198 | } |
| 199 | |
| 200 | if (message.type === 'browsertime.pageSummary') { |
| 201 | this.browsertimePageSummaries.push(message.data); |
| 202 | } |
| 203 | |
| 204 | if (message.type === 'browsertime.har') { |
| 205 | this.browsertimeHAR = message.data; |
| 206 | } |
| 207 | |
| 208 | // Don't return promise in loop - we don't want to wait for completion, |
| 209 | // just post the message. |
| 210 | for (let item of this.queues) { |
| 211 | item.queue(message); |
| 212 | } |
| 213 | } |
| 214 | |
| 215 | async startProcessingQueues() { |
| 216 | for (const item of this.queues) { |
no test coverage detected