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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 Debug.setBreakPoint(f, 5); | 66 Debug.setBreakPoint(f, 5); |
68 | 67 |
69 f(); | 68 f(); |
70 | 69 |
71 %RunMicrotasks(); | 70 %RunMicrotasks(); |
72 | 71 |
73 assertEqualsAsync(3, async () => break_count); | 72 assertEqualsAsync(3, async () => break_count); |
74 assertEqualsAsync(null, async () => exception); | 73 assertEqualsAsync(null, async () => exception); |
75 | 74 |
76 Debug.setListener(null); | 75 Debug.setListener(null); |
OLD | NEW |