| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Flags: --harmony-async-await | |
| 6 | |
| 7 var Debug = debug.Debug; | 5 var Debug = debug.Debug; |
| 8 var step_count = 0; | 6 var step_count = 0; |
| 9 | 7 |
| 10 function listener(event, execState, eventData, data) { | 8 function listener(event, execState, eventData, data) { |
| 11 if (event != Debug.DebugEvent.Break) return; | 9 if (event != Debug.DebugEvent.Break) return; |
| 12 try { | 10 try { |
| 13 var line = execState.frame(0).sourceLineText(); | 11 var line = execState.frame(0).sourceLineText(); |
| 14 print(line); | 12 print(line); |
| 15 var [match, expected_count, step] = /\/\/ B(\d) (\w+)$/.exec(line); | 13 var [match, expected_count, step] = /\/\/ B(\d) (\w+)$/.exec(line); |
| 16 assertEquals(step_count++, parseInt(expected_count)); | 14 assertEquals(step_count++, parseInt(expected_count)); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 return b; | 47 return b; |
| 50 } | 48 } |
| 51 | 49 |
| 52 f1(); | 50 f1(); |
| 53 | 51 |
| 54 late_resolve(3); | 52 late_resolve(3); |
| 55 | 53 |
| 56 %RunMicrotasks(); | 54 %RunMicrotasks(); |
| 57 | 55 |
| 58 assertEquals(9, step_count); | 56 assertEquals(9, step_count); |
| OLD | NEW |