| 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: --expose-debug-as debug | 5 // Flags: --harmony-async-await |
| 6 // Flags: --harmony-async-await --allow-natives-syntax | |
| 7 | 6 |
| 8 var Debug = debug.Debug; | 7 var Debug = debug.Debug; |
| 9 | 8 |
| 10 function assertEqualsAsync(expected, run, msg) { | 9 function assertEqualsAsync(expected, run, msg) { |
| 11 var actual; | 10 var actual; |
| 12 var hadValue = false; | 11 var hadValue = false; |
| 13 var hadError = false; | 12 var hadError = false; |
| 14 var promise = run(); | 13 var promise = run(); |
| 15 | 14 |
| 16 if (typeof promise !== "object" || typeof promise.then !== "function") { | 15 if (typeof promise !== "object" || typeof promise.then !== "function") { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 } | 68 } |
| 70 | 69 |
| 71 f(); | 70 f(); |
| 72 | 71 |
| 73 %RunMicrotasks(); | 72 %RunMicrotasks(); |
| 74 | 73 |
| 75 assertEqualsAsync(2, async () => break_count); | 74 assertEqualsAsync(2, async () => break_count); |
| 76 assertEqualsAsync(null, async () => exception); | 75 assertEqualsAsync(null, async () => exception); |
| 77 | 76 |
| 78 Debug.setListener(null); | 77 Debug.setListener(null); |
| OLD | NEW |