(expression, expectedBreakpoint)
| 98 | ]); |
| 99 | |
| 100 | async function evaluate(expression, expectedBreakpoint) { |
| 101 | InspectorTest.log('evaluating ' + expression + ':'); |
| 102 | let paused = Protocol.Debugger.oncePaused(); |
| 103 | let evaluate = Protocol.Runtime.evaluate({expression}); |
| 104 | let result = await Promise.race([paused, evaluate]); |
| 105 | if (result.method === 'Debugger.paused') { |
| 106 | if (result.params.hitBreakpoints) { |
| 107 | if (result.params.hitBreakpoints.find(b => b === expectedBreakpoint)) { |
| 108 | InspectorTest.log(' hit expected breakpoint') |
| 109 | } else { |
| 110 | InspectorTest.log(' hit unexpected breakpoint'); |
| 111 | } |
| 112 | } |
| 113 | await Protocol.Debugger.resume(); |
| 114 | } else { |
| 115 | InspectorTest.log(' not paused'); |
| 116 | } |
| 117 | } |
no test coverage detected