(inputLocations)
| 340 | } |
| 341 | |
| 342 | async logBreakLocations(inputLocations) { |
| 343 | let locations = inputLocations.slice(); |
| 344 | let scriptId = locations[0].scriptId; |
| 345 | let script = await this.getScriptWithSource(scriptId); |
| 346 | let lines = script.scriptSource.split('\n'); |
| 347 | locations = locations.sort((loc1, loc2) => { |
| 348 | if (loc2.lineNumber !== loc1.lineNumber) return loc2.lineNumber - loc1.lineNumber; |
| 349 | return loc2.columnNumber - loc1.columnNumber; |
| 350 | }); |
| 351 | for (let location of locations) { |
| 352 | let line = lines[location.lineNumber]; |
| 353 | line = line.slice(0, location.columnNumber) + locationMark(location.type) + line.slice(location.columnNumber); |
| 354 | lines[location.lineNumber] = line; |
| 355 | } |
| 356 | lines = lines.filter(line => line.indexOf('//# sourceURL=') === -1); |
| 357 | InspectorTest.log(lines.join('\n') + '\n'); |
| 358 | return inputLocations; |
| 359 | |
| 360 | function locationMark(type) { |
| 361 | if (type === 'return') return '|R|'; |
| 362 | if (type === 'call') return '|C|'; |
| 363 | if (type === 'debuggerStatement') return '|D|'; |
| 364 | return '|_|'; |
| 365 | } |
| 366 | } |
| 367 | |
| 368 | async logTypeProfile(typeProfile, source) { |
| 369 | let entries = typeProfile.entries; |
no test coverage detected